httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_expr_eval.c
Date Tue, 31 Jul 2001 16:45:10 GMT
wrowe       01/07/31 09:45:10

  Modified:    modules/ssl ssl_expr_eval.c
  Log:
    Another huge file check, and one fewer emits
  
  Revision  Changes    Path
  1.6       +6 -1      httpd-2.0/modules/ssl/ssl_expr_eval.c
  
  Index: ssl_expr_eval.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_expr_eval.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ssl_expr_eval.c	2001/07/19 22:35:32	1.5
  +++ ssl_expr_eval.c	2001/07/31 16:45:10	1.6
  @@ -233,7 +233,12 @@
           return "";
       }
       apr_file_info_get(&finfo, APR_FINFO_SIZE, fp);
  -    len = finfo.size;
  +    if ((finfo.size + 1) != ((apr_size_t)finfo.size + 1)) {
  +        ssl_expr_error = "Huge file cannot be read";
  +        apr_file_close(fp);
  +        return "";
  +    }
  +    len = (apr_size_t)finfo.size;
       if (len == 0) {
           buf = (char *)apr_palloc(r->pool, sizeof(char) * 1);
           *buf = NUL;
  
  
  

Mime
View raw message