httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Possible error in apr_rgetline_core
Date Tue, 21 Sep 2004 16:42:31 GMT
On Tue, Sep 21, 2004 at 11:33:32AM -0500, Rici Lake wrote:
> On 21-Sep-04, at 11:03 AM, Joe Orton wrote:
> >pass 2: bytes_handled = 8191, *s = 8191-byte region
> 
> Quite right: I hadn't looked closely enough at the case where there was 
> no user-supplied buffer :(

Between us we'll have it covered...

> Ok, bytes_handled can never be > n, right?
> 
> So the following ought to work:

Yes, good, I was about to add a preceding if (bytes_handled == 0) branch
but your patch is better, I'll commit it this evening.  Thanks for this.

> 255                if (bytes_handled > 0) {
> 256                    (*s)[bytes_handled-1] = '\0';
> 257                }
> 258                else {
> 259                    (*s)[0] = '\0';
> 260                }


Mime
View raw message