[Zope] pcgi-wrapper.exe
Oleg Broytmann
phd@phd.russ.ru
Tue, 25 Jan 2000 13:06:18 +0000 (GMT)
On Mon, 24 Jan 2000, Larry Luther wrote:
> pcgi-wrapper.c bugs & programming oddities
>
> * The first error stems from using strlen and atol
> on a buffer which has not been null terminated.
> The program works because the programmer got lucky
> because the buffer is followed by a pointer which
> is initialized to zero and is never used.
>
> In "main":
>
> char t[10]={0}; should be char t[HDRLEN+1] = {0};
When I worked on mod_pcgi2 I caught and fixed the error, but I preferred
not to touch pcgi-wraper.c...
> * sizeof(char) is used liberally, but according to
> "The C Programming language" 2nd edition ANSI version.
> "sizeof(char) == 1", see Pg 204 under A7.4.8.
> When "sizeof(char)" is replaced by "1", the code
> simplifies nicely.
And I feel sometimes the code assumes sizeof(char) == 1 anyway...
Oleg.
----
Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru
Programmers don't die, they just GOSUB without RETURN.