This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
SMALL error in server_test
- To: "'eCos'" <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] SMALL error in server_test
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Mon, 18 Jun 2001 15:20:30 -0600
- Organization: Extreme Engineering
Line 149 and 150 of server_test.c should read
len = read(client, buf, sizeof(buf) - 1);
buf[len] = '\0';
After all, we're using "buf" as a "C" string buffer and we need to
reserve one byte for the null. Otherwise the last character is cut off
by line 150 setting it to null.