httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rici Lake <r...@ricilake.net>
Subject Re: Possible error in apr_rgetline_core
Date Tue, 21 Sep 2004 16:33:32 GMT

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 :(

Ok, bytes_handled can never be > n, right?

So the following ought to work:

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



Mime
View raw message