httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Tue, 12 Aug 2003 17:46:29 GMT
stas        2003/08/12 10:46:29

  Modified:    .        CHANGES
               modules/filters mod_deflate.c
  Log:
       Fix bug in mod_deflate, which was passing calling deflate()
       without checkinig first whether it has something to deflate. (currently
       this causes deflate to generate a fatal error according to the zlib spec).
       PR 22259.
  
  Revision  Changes    Path
  1.1249    +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1248
  retrieving revision 1.1249
  diff -u -r1.1248 -r1.1249
  --- CHANGES	7 Aug 2003 16:38:18 -0000	1.1248
  +++ CHANGES	12 Aug 2003 17:46:29 -0000	1.1249
  @@ -2,6 +2,11 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) Fix bug in mod_deflate, which was passing calling deflate()
  +     without checkinig first whether it has something to deflate. (currently 
  +     this causes deflate to generate a fatal error according to the zlib spec).
  +     PR 22259. [Stas Bekman]
  +
     *) Avoid an infinite recursion, which occured if the name of an included
        config file or directory contained a wildcard character. PR 22194.
        [André Malo]
  
  
  
  1.36      +5 -4      httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_deflate.c	22 Jul 2003 05:36:54 -0000	1.35
  +++ mod_deflate.c	12 Aug 2003 17:46:29 -0000	1.36
  @@ -530,10 +530,11 @@
           if (APR_BUCKET_IS_FLUSH(e)) {
               apr_bucket *bkt;
               apr_status_t rv;
  -
  -            zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
  -            if (zRC != Z_OK) {
  -                return APR_EGENERAL;
  +            if (ctx->stream.avail_in > 0) {
  +                zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
  +                if (zRC != Z_OK) {
  +                    return APR_EGENERAL;
  +                }
               }
   
               ctx->stream.next_out = ctx->buffer;
  
  
  

Mime
View raw message