cvs: php4 /ext/standard file.c

From: Date: Tue, 22 Oct 2002 18:07:11 +0000
Subject: cvs: php4 /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15153@lists.php.net to get a copy of this message
iliaa Tue Oct 22 14:07:11 2002 EDT Modified files: /php4/ext/standard file.c Log: Fixed a possible segmentation fault in file() function. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.274 php4/ext/standard/file.c:1.275 --- php4/ext/standard/file.c:1.274 Mon Oct 21 18:54:37 2002 +++ php4/ext/standard/file.c Tue Oct 22 14:07:11 2002 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.274 2002/10/21 22:54:37 wez Exp $ */ +/* $Id: file.c,v 1.275 2002/10/22 18:07:11 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -461,7 +461,7 @@ { char *filename; int filename_len; - char *slashed, *target_buf, *p, *s, *e; + char *slashed, *target_buf=NULL, *p, *s, *e; register int i = 0; int target_len, len; char eol_marker = '\n'; @@ -516,7 +516,9 @@ } } - efree(target_buf); + if (target_buf) { + efree(target_buf); + } php_stream_close(stream); } /* }}} */

« previous php.cvs (#15153) next »