cvs: php-src /ext/cpdf cpdf.c

From: Date: Tue, 09 Nov 2004 00:44:13 +0000
Subject: cvs: php-src /ext/cpdf cpdf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-29146@lists.php.net to get a copy of this message
iliaa Mon Nov 8 19:44:13 2004 EDT Modified files: /php-src/ext/cpdf cpdf.c Log: 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.59&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.59 --- 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:12 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cpdf.c,v 1.58 2004/07/01 04:43:29 pollita Exp $ */ +/* $Id: cpdf.c,v 1.59 2004/11/09 00:44:12 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);

« previous php.cvs (#29146) next »