[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: [PATCH] mod_proxy truncates status line
From:       "Bill Stoddard" <bill () wstoddard ! com>
Date:       2001-12-31 20:25:14
[Download RAW message or body]


> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic