httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@hyperreal.org
Subject cvs commit: apache/src/modules/proxy proxy_util.c
Date Mon, 05 Jan 1998 21:02:57 GMT
marc        98/01/05 13:02:57

  Modified:    src/modules/proxy Tag: APACHE_1_2_X proxy_util.c
  Log:
  Fix an improper length in an ap_snprintf call in proxy_date_canon().
  
  Reviewed by:	Martin Kraemer, Mark J Cox, Dean Gaudet, Randy Terbush
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.17.2.1  +5 -2      apache/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- proxy_util.c	1997/06/04 21:20:27	1.17
  +++ proxy_util.c	1998/01/05 21:02:56	1.17.2.1
  @@ -296,8 +296,11 @@
       for (mon=0; mon < 12; mon++) if (strcmp(month, months[mon]) == 0) break;
       if (mon == 12) return x;
   
  -    if (strlen(x) < 31) x = palloc(p, 31);
  -    ap_snprintf(x, strlen(x)+1, "%s, %.2d %s %d %.2d:%.2d:%.2d GMT", wday[wk], mday,
  +    if (strlen(x)+1 < 30) {
  +        x = palloc(p, 30);
  +    }
  +    /* format: "Wed, 17 Dec 1997 00:53:40 GMT" (29 chars data) */
  +    ap_snprintf(x, 30, "%s, %.2d %s %d %.2d:%.2d:%.2d GMT", wday[wk], mday,
   	    months[mon], year, hour, min, sec);
       return x;
   }
  
  
  

Mime
View raw message