cvs: php3 / main.c request_info.c

From: Date: Mon, 16 Oct 2000 17:21:09 +0000
Subject: cvs: php3 / main.c request_info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2074@lists.php.net to get a copy of this message
sas Mon Oct 16 10:21:09 2000 EDT Modified files: /php3 main.c request_info.c Log: Fix file upload crash. rfc1867_uploaded_files was only initialized in the CGI version. Index: php3/main.c diff -u php3/main.c:1.516 php3/main.c:1.517 --- php3/main.c:1.516 Wed Oct 11 02:31:30 2000 +++ php3/main.c Mon Oct 16 10:21:08 2000 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.516 2000/10/11 09:31:30 kk Exp $ */ +/* $Id: main.c,v 1.517 2000/10/16 17:21:08 sas Exp $ */ /* #define CRASH_DETECTION */ @@ -672,6 +672,8 @@ php3_printf("Unable to initialize request info.\n"); return FAILURE; } + _php3_hash_init(&GLOBAL(request_info).rfc1867_uploaded_files, 5, NULL, NULL, 0); + GLOBAL(initialized) |= INIT_REQUEST_INFO; /* prepare general symbol table hash */ @@ -888,6 +890,7 @@ SHUTDOWN_DEBUG("Request info"); php3_destroy_request_info((void *) &php3_ini); GLOBAL(initialized) &= ~INIT_REQUEST_INFO; + _php3_hash_destroy(&GLOBAL(request_info).rfc1867_uploaded_files); } if (GLOBAL(initialized) & INIT_INCLUDE_NAMES_HASH) { SHUTDOWN_DEBUG("Include names hash"); Index: php3/request_info.c diff -u php3/request_info.c:1.44 php3/request_info.c:1.45 --- php3/request_info.c:1.44 Sat Sep 9 14:05:45 2000 +++ php3/request_info.c Mon Oct 16 10:21:09 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: request_info.c,v 1.44 2000/09/09 21:05:45 zeev Exp $ */ +/* $Id: request_info.c,v 1.45 2000/10/16 17:21:09 sas Exp $ */ #include "php.h" php3_request_info request_info; @@ -87,7 +87,6 @@ GLOBAL(request_info).filename = NULL; } #endif - _php3_hash_init(&GLOBAL(request_info).rfc1867_uploaded_files, 5, NULL, NULL, 0); return SUCCESS; } @@ -95,7 +94,6 @@ { TLS_VARS; STR_FREE(GLOBAL(request_info).current_user); - _php3_hash_destroy(&GLOBAL(request_info).rfc1867_uploaded_files); return SUCCESS; } #endif

« previous php.cvs (#2074) next »