marc 99/06/16 23:03:21
Modified: src/main util.c
Log:
Fix bug in ap_field_noparam() that resulted in SEGVs when used with
content types that don't have a ';' in them.
Revision Changes Path
1.164 +4 -2 apache-1.3/src/main/util.c
Index: util.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- util.c 1999/06/04 18:30:31 1.163
+++ util.c 1999/06/17 06:03:20 1.164
@@ -128,12 +128,14 @@
const char *semi;
semi = strchr(intype, ';');
- if (semi != NULL) {
+ if (!semi) {
+ return ap_pstrdup(p, intype);
+ } else {
while ((semi > intype) && ap_isspace(semi[-1])) {
semi--;
}
+ return ap_pstrndup(p, intype, semi - intype);
}
- return ap_pstrndup(p, intype, semi - intype);
}
API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt)