httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: [PATCH] mod_proxy truncates status line
Date Mon, 31 Dec 2001 20:25:14 GMT

> On Sun, Dec 30, 2001 at 02:58:16PM +0200, Graham Leggett wrote:
> > Adam Sussman wrote:
> >
> > > Mod_proxy truncates the status line returned by the proxied
> > > server.  One character gets snipped off of the end of the
> > > status line.
> >
> > Are you 100% sure the buffer is big enough to do this? If the buffer is
> > of size "len" the zero will be written past the end of the buffer.
> >
>
> In the current code, "len" is strlen(buffer) ...

Which means that we can just remove the assignment entirely. buffer is already NULL
terminated else strlen would be blowing up. In fact, ap_proxy_string_read() NULL
terminates the returned buffer.

Bill


Mime
View raw message