Date: 11/30/98
- Next message: Bug Database: "[PHP-DEV] Bug #959 Updated: Magic Quotes in Oracle (replaces bug 957)"
- Previous message: michale <email protected>: "[PHP-DEV] Bug #960: Apache SIGSEGV hang on getallheaders()"
- Next in thread: Bug Database: "[PHP-DEV] Bug #960 Updated: Apache SIGSEGV hang on getallheaders()"
- Maybe reply: Bug Database: "[PHP-DEV] Bug #960 Updated: Apache SIGSEGV hang on getallheaders()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 960
User Update by: michale <email protected>
Status: Open
Bug Type: Reproduceable crash
Description: Apache SIGSEGV hang on getallheaders()
In case of occurence NULL strings in http headers hangs the Apache version of php3 during php3_getallheaders function.
This is because add_assoc_string() internal fuction cannot handle NULL pointer strings, the libc strlen(NULL) function called from add_assoc_string has bad NULL argument.
NULL value in http header is not prohibited value, Apache woks with such headers correctly. NULL header string generates e.g. mod_html module & patch (module for language encoding, mailto:lampa <email protected>).
Here is a patch to correct the problem:
*** apache.c.old Mon Oct 5 02:21:36 1998
--- apache.c Mon Nov 30 11:50:28 1998
***************
*** 217,223 ****
!strncasecmp(tenv[i].key, "authorization", 13))) {
continue;
}
! if (add_assoc_string(return_value, tenv[i].key,tenv[i].val, 1)==FAILURE) {
RETURN_FALSE;
}
}
--- 217,223 ----
!strncasecmp(tenv[i].key, "authorization", 13))) {
continue;
}
! if (add_assoc_string(return_value, tenv[i].key,(tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
RETURN_FALSE;
}
}
Full Bug description available at: http://ca.php.net/bugs.php3?id=960
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #959 Updated: Magic Quotes in Oracle (replaces bug 957)"
- Previous message: michale <email protected>: "[PHP-DEV] Bug #960: Apache SIGSEGV hang on getallheaders()"
- Next in thread: Bug Database: "[PHP-DEV] Bug #960 Updated: Apache SIGSEGV hang on getallheaders()"
- Maybe reply: Bug Database: "[PHP-DEV] Bug #960 Updated: Apache SIGSEGV hang on getallheaders()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

