iliaa Mon Nov 8 19:44:30 2004 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/cpdf cpdf.c
Log:
MFH: Fixed crash inside cpdf_setdash() if called before page init.
http://cvs.php.net/diff.php/php-src/ext/cpdf/cpdf.c?r1=1.58&r2=1.58.2.1&ty=u
Index: php-src/ext/cpdf/cpdf.c
diff -u php-src/ext/cpdf/cpdf.c:1.58 php-src/ext/cpdf/cpdf.c:1.58.2.1
--- php-src/ext/cpdf/cpdf.c:1.58 Thu Jul 1 00:43:29 2004
+++ php-src/ext/cpdf/cpdf.c Mon Nov 8 19:44:29 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cpdf.c,v 1.58 2004/07/01 04:43:29 pollita Exp $ */
+/* $Id: cpdf.c,v 1.58.2.1 2004/11/09 00:44:29 iliaa Exp $ */
/* cpdflib.h -- C language API definitions for ClibPDF library
* Copyright (C) 1998 FastIO Systems, All Rights Reserved.
*/
@@ -1286,6 +1286,10 @@
convert_to_long_ex(arg2);
convert_to_long_ex(arg3);
+ if (!pdf->currentMemStream) {
+ RETURN_FALSE;
+ }
+
snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_PP(arg2), (int)
Z_LVAL_PP(arg3));
cpdf_setdash(pdf, buffer);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php