cvs: php4 /ext/gd gd.c

From: Date: Fri, 23 Aug 2002 17:45:47 +0000
Subject: cvs: php4 /ext/gd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13607@lists.php.net to get a copy of this message
wez Fri Aug 23 13:45:47 2002 EDT Modified files: /php4/ext/gd gd.c Log: Fix segfault reported by Rasmus. Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.206 php4/ext/gd/gd.c:1.207 --- php4/ext/gd/gd.c:1.206 Thu Aug 22 15:14:27 2002 +++ php4/ext/gd/gd.c Fri Aug 23 13:45:46 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.206 2002/08/22 19:14:27 helly Exp $ */ +/* $Id: gd.c,v 1.207 2002/08/23 17:45:46 wez Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -514,13 +514,13 @@ while (b < hdr_size && (n = php_stream_read(stream, (char*)&font[b], hdr_size - b))) b += n; if (!n) { - php_stream_close(stream); efree(font); if (php_stream_eof(stream)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "End of file while reading header"); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading header"); } + php_stream_close(stream); RETURN_FALSE; } i = php_stream_tell(stream);

« previous php.cvs (#13607) next »