cvs: /php4 fopen-wrappers.c

From: Date: Mon, 06 Dec 1999 15:31:16 +0000
Subject: cvs: /php4 fopen-wrappers.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-7525@lists.php.net to get a copy of this message
zeev Mon Dec 6 10:31:16 1999 EDT Modified files: /php4 fopen-wrappers.c Log: opened_path could end up uninitialized - fixed Index: php4/fopen-wrappers.c diff -u php4/fopen-wrappers.c:1.32 php4/fopen-wrappers.c:1.33 --- php4/fopen-wrappers.c:1.32 Sat Dec 4 14:15:41 1999 +++ php4/fopen-wrappers.c Mon Dec 6 10:30:44 1999 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.32 1999/12/04 19:15:41 sas Exp $ */ +/* $Id: fopen-wrappers.c,v 1.33 1999/12/06 15:30:44 zeev Exp $ */ /* Synced with php3 revision 1.66 1999-06-18 [ssb] */ @@ -186,6 +186,10 @@ int cm=2; /* checkuid mode: 2 = if file does not exist, check directory */ PLS_FETCH(); + if (opened_path) { + *opened_path = NULL; + } + /* FIXME Lets not get in the habit of doing stuff like this. This should be runtime enabled, NOT compile time. */ #if PHP3_URL_FOPEN @@ -320,10 +324,11 @@ int cm=2; PLS_FETCH(); - if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0; if (opened_path) { *opened_path = NULL; } + + if(!strcmp(mode,"r") || !strcmp(mode,"r+")) cm=0; /* Relative path open */ if (*filename == '.') { if (PG(safe_mode) && (!_php3_checkuid(filename, cm))) {

« previous php.version4 (#7525) next »