httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Regarding parse_byterange()
Date Thu, 29 Apr 2004 16:16:12 GMT
On Thu, Apr 29, 2004 at 09:00:24AM -0700, Mathihalli, Madhusudan wrote:
> 
> >-----Original Message-----
> >From: Joe Orton [mailto:jorton@redhat.com]
> [SNIP]
> 
> >apr_off_t is the right type to use since these are file offsets.
> >parse_byterange should probably check for integer overflow when
> >sizeof(apr_off_t) != sizeof(apr_int64_t), but if you have a >2gb file
> >and a 32-bit apr_off_t, you're stuck anyway.
> 
> .. if that is the case, why use apr_atoi64 ? It's the wrong function.
> Is it because httpd is trying to adjust to the un-availability of
> something like apr_offset_atoi() ?

An APR function like that would be useful, but it's reasonably simple to
cope without it.

> What if the user really sent a
> large value for a small file ? Instead of erroring out - thanks to the
> overflow mechanism, we'll probably end up serving a sane result -
> Should we leave it that way ?

Oh, good point, yes, it should definitely be fixed then.

joe

Mime
View raw message