]> granicus.if.org Git - php/commitdiff
When using pdf_get_buffer() and doing a correct cleanup by calling pdf_delete()
authorRainer Schaaf <rjs@php.net>
Wed, 21 Feb 2001 23:30:21 +0000 (23:30 +0000)
committerRainer Schaaf <rjs@php.net>
Wed, 21 Feb 2001 23:30:21 +0000 (23:30 +0000)
this always resulted in a coredump (after everything was finished, so only
visible in the logfile).
So it seems to be neccesary to copy the contents of the result of get_buffer,
to avoid this coredump.

ext/pdf/pdf.c

index c8bc7283014387538f950d114f6fbc23d8324390..7519bc43b072989595eebb96a1eae6b839fae1a8 100644 (file)
@@ -2176,7 +2176,7 @@ PHP_FUNCTION(pdf_get_buffer) {
 
        buffer = PDF_get_buffer(pdf, &size);
 
-       RETURN_STRINGL((char *)buffer, size, 0);
+       RETURN_STRINGL((char *)buffer, size, 1);
 }
 
 /* }}} */