Must really be safe_read(), not full_read()? (was: [PATCH] fix httpd lockup in cgi POSTs)
Matthias Reichl
hias at horus.com
Wed Feb 14 09:56:34 UTC 2007
On Tue, Feb 13, 2007 at 11:55:14PM +0100, Denis Vlasenko wrote:
> + int fcount = 0; /* byte counter for first line */
>
> You reset counter on each while() iteration
Thanks, you are right. It's in the wrong scope.
> + if (fcount == HTTP_200_CHECK_LEN) {
> + rbuf[fcount] = '\0';
>
> What is the purpose of rbuf[fcount] = '\0' ?
Nothing. This is just old copied code. It was "rbuf[count] = '\0'"
before, used by the (removed) "strstr..." check.
so long,
Hias
More information about the busybox
mailing list