apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr-util/buckets apr_buckets_file.c
Date Sun, 02 Dec 2001 00:28:11 GMT
jwoolley    01/12/01 16:28:11

  Modified:    buckets  apr_buckets_file.c
  Log:
  Fix segfault caused by accidentally attempting to mmap a zero-byte file.
  
  Reported by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.63      +1 -1      apr-util/buckets/apr_buckets_file.c
  
  Index: apr_buckets_file.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -d -u -r1.62 -r1.63
  --- apr_buckets_file.c	2001/11/29 01:20:56	1.62
  +++ apr_buckets_file.c	2001/12/02 00:28:11	1.63
  @@ -94,7 +94,7 @@
               filelength = APR_MMAP_LIMIT;
           }
       }
  -    else if ((filelength >= APR_MMAP_THRESHOLD) &&
  +    else if ((filelength < APR_MMAP_THRESHOLD) ||
                (apr_mmap_create(&mm, a->fd, fileoffset, filelength,
                                 APR_MMAP_READ, p) != APR_SUCCESS))
       {
  
  
  

Mime
View raw message