iliaa           Mon Nov  8 19:45:39 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /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.43.4.6&r2=1.43.4.7&ty=u
Index: php-src/ext/cpdf/cpdf.c
diff -u php-src/ext/cpdf/cpdf.c:1.43.4.6 php-src/ext/cpdf/cpdf.c:1.43.4.7
--- php-src/ext/cpdf/cpdf.c:1.43.4.6    Mon May 10 18:13:39 2004
+++ php-src/ext/cpdf/cpdf.c     Mon Nov  8 19:45:39 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: cpdf.c,v 1.43.4.6 2004/05/10 22:13:39 iliaa Exp $ */
+/* $Id: cpdf.c,v 1.43.4.7 2004/11/09 00:45:39 iliaa Exp $ */
 /* cpdflib.h -- C language API definitions for ClibPDF library
  * Copyright (C) 1998 FastIO Systems, All Rights Reserved.
 */
@@ -1563,7 +1563,9 @@
                php_error(E_WARNING, "%s(): Unable to find identifier %d", 
get_active_function_name(TSRMLS_C), id);
                RETURN_FALSE;
        }
-
+       if (!pdf->currentMemStream) {
+               RETURN_FALSE;
+       }
        snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_P(arg2), (int) 
Z_LVAL_P(arg3));
        cpdf_setdash(pdf, buffer);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to