martin 99/04/19 05:30:47
Modified: src/modules/proxy proxy_cache.c
Log:
Not every ANSI compliant compiler supports auto-arrays of dynamic size.
Use defensive approach and allocate filename using ap_palloc().
Revision Changes Path
1.58 +2 -2 apache-1.3/src/modules/proxy/proxy_cache.c
Index: proxy_cache.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- proxy_cache.c 1999/04/08 20:27:44 1.57
+++ proxy_cache.c 1999/04/19 12:30:46 1.58
@@ -280,7 +280,7 @@
const struct cache_conf *conf = &pconf->cache;
const char *cachedir = conf->root;
- char filename[ strlen(cachedir) + strlen( DOT_TIME ) +1];
+ char *filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME
) +1);
struct stat buf;
int timefd;
time_t every = conf->gcinterval;
@@ -349,7 +349,7 @@
array_header *files;
struct gc_ent *fent;
int i;
- char filename[ strlen(cachedir) + HASH_LEN + 2];
+ char *filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
cachedir = conf->root;
/* configured size is given in kB. Make it bytes, convert to long61_t: */