You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/02 00:52:51 UTC

cvs commit: apache-2.0/src/main util_md5.c

trawick     00/06/01 15:52:51

  Modified:    src      CHANGES
               src/main util_md5.c
  Log:
  Fix a SIGSEGV in ap_md5digest() (bad parms to ap_seek()).  This is used
  when you have ContentDigest enabled and we can't/don't mmap the file.
  
  Revision  Changes    Path
  1.127     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- CHANGES	2000/05/30 02:42:32	1.126
  +++ CHANGES	2000/06/01 22:52:50	1.127
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0a4
   
  +  *) Fix a SIGSEGV in ap_md5digest(), which is used when you have
  +     ContentDigest enabled and we can't/don't mmap the file. 
  +     [Jeff Trawick]
  +
     *) We now report the correct line number for syntax errors in config
        files.  [Ryan Bloom, Greg Stein, Jeff Trawick]
   
  
  
  
  1.15      +4 -2      apache-2.0/src/main/util_md5.c
  
  Index: util_md5.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_md5.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- util_md5.c	2000/05/18 19:54:44	1.14
  +++ util_md5.c	2000/06/01 22:52:50	1.15
  @@ -203,6 +203,7 @@
       unsigned char buf[1000];
       long length = 0;
       int nbytes;
  +    ap_off_t offset = 0L;
   
       ap_MD5Init(&context);
       if (xlate) {
  @@ -213,7 +214,7 @@
   	length += nbytes;
   	ap_MD5Update(&context, buf, nbytes);
       }
  -    ap_seek(infile, 0L, APR_SET);
  +    ap_seek(infile, APR_SET, &offset);
       return ap_md5contextTo64(p, &context);
   }
   
  @@ -225,6 +226,7 @@
       unsigned char buf[1000];
       long length = 0;
       ap_ssize_t nbytes;
  +    ap_off_t offset = 0L;
   
       ap_MD5Init(&context);
       nbytes = sizeof(buf);
  @@ -232,7 +234,7 @@
   	length += nbytes;
   	ap_MD5Update(&context, buf, nbytes);
       }
  -    ap_seek(infile, 0L, APR_SET);
  +    ap_seek(infile, APR_SET, &offset);
       return ap_md5contextTo64(p, &context);
   }