cvs: php4 /main SAPI.c
| From: | Stefan Esser | Date: | Sun, 16 Dec 2001 14:47:18 +0000 |
| Subject: | cvs: php4 /main SAPI.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8670@lists.php.net to get a copy of this message | ||
sesser Sun Dec 16 09:47:18 2001 EDT
Modified files:
/php4/main SAPI.c
Log:
fixed: bufferoverflow in sapi_add_header_ex triggerable by header("WWW-Authenticate: Basic
foobar");
Index: php4/main/SAPI.c
diff -u php4/main/SAPI.c:1.124 php4/main/SAPI.c:1.125
--- php4/main/SAPI.c:1.124 Tue Dec 11 10:31:00 2001
+++ php4/main/SAPI.c Sun Dec 16 09:47:18 2001
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.124 2001/12/11 15:31:00 sebastian Exp $ */
+/* $Id: SAPI.c,v 1.125 2001/12/16 14:47:18 sesser Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -504,6 +504,7 @@
efree(result);
conv_len = sprintf(conv_temp," realm=\"%ld\"",myuid);
result = emalloc(ptr_len+conv_len+1);
+ result_len = ptr_len+conv_len;
memcpy(result, ptr, ptr_len);
memcpy(result+ptr_len, conv_temp, conv_len);
*(result+ptr_len+conv_len) = '\0';