You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ha...@ooo.lanl.gov> on 1996/02/14 01:48:01 UTC
103.SEGV_table_get.patch
If you put mod_expires through enough hoops before using it, then
it can core dump by calling table_get with a NULL parameter.
103.SEGV_table_get.patch to the rescue!
-=-==-=-=-=
From: Rob H
Subject: SIGSEGV possibility (noticed in mod_expires.c)
Changelog: another bug fix
Comments: modules probably need to do more error checking, but lets not core
dump if they don't always.
*** alloc.c.orig Mon Feb 12 22:51:23 1996
--- alloc.c Tue Feb 13 17:31:11 1996
***************
*** 545,550 ****
--- 545,552 ----
table_entry *elts = (table_entry *)t->elts;
int i;
+ if (key == NULL) return NULL;
+
for (i = 0; i < t->nelts; ++i)
if (!strcasecmp (elts[i].key, key))
return elts[i].val;