bjh 99/12/21 07:16:39
Modified: src/lib/apr/time/unix time.c Log: Prevent segfault on comparing an uninitialized ap_time_t object. Treat it as a zero value, same as a NULL ap_time_t pointer. Revision Changes Path 1.14 +2 -2 apache-2.0/src/lib/apr/time/unix/time.c Index: time.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- time.c 1999/12/20 16:10:16 1.13 +++ time.c 1999/12/21 15:16:36 1.14 @@ -237,10 +237,10 @@ */ ap_status_t ap_timecmp(struct atime_t *a, struct atime_t *b) { - if (a == NULL) { + if (a == NULL || a->currtime == NULL) { return APR_LESS; } - else if (b == NULL) { + else if (b == NULL || b->currtime == NULL) { return APR_MORE; }