httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathihalli, Madhusudan" <>
Subject RE: Regarding parse_byterange()
Date Thu, 29 Apr 2004 16:00:24 GMT

>-----Original Message-----
>From: Joe Orton []

>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() ?
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 ?

View raw message