mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
MFH: Fixed crash inside cpdf_setdash() if called before page init.
This commit is contained in:
@@ -1286,6 +1286,10 @@ PHP_FUNCTION(cpdf_setdash)
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user