On Fri, 28 Feb 2003, Sander Striker wrote:

> Can someone at home in the file buckets take a look at these:
>
> buckets/apr_buckets_file.c:93:        if (apr_mmap_create(&mm, a->fd, 
> fileoffset, APR_MMAP_LIMIT,
> buckets/apr_buckets_file.c:102:             (apr_mmap_create(&mm, a->fd, 
> fileoffset, filelength,
>
> And see if 0 length files are handled correctly?

I suspect they're not, but I'll have to check.  I suppose the best
solution would be to go ahead and try to mmap the file; if you get an
error, see if it's einval and you passed mmap a zero length file.  if so,
morph yourself to a zero-length immortal bucket.  that way we don't pay
the cost of *three* error tests in the main-line case, only two.

--Cliff

Reply via email to