PHP 4.0 Bug #8394 Updated: pdf_open_image_file() makes PHP segfault

From: Date: Thu, 28 Dec 2000 16:42:25 +0000
Subject: PHP 4.0 Bug #8394 Updated: pdf_open_image_file() makes PHP segfault
Groups: php.dev 
Request: Send a blank email to php-dev+get-42436@lists.php.net to get a copy of this message
ID: 8394 Updated by: troels Reported By: troels@arvin.dk Status: Open Bug Type: PDF related Assigned To: Comments: The patch at http://rpms.arvin.dk/php/source/patches/php-pdf.c.patch stops the segfauling on Linux. But it will probably result in segfaults in Windows. The patch is mostly a port of PHP 3.0.4pl1's pdf.c code. I'w wondering how virtual_filepath() is meant to be used. In swf.c and gdttf.c, it's used like this: #ifdef VIRTUAL_DIR // This seems to imply Windows? if (virtual_filepath(aaa, &bbb)) { // do something if the file isn't there return NULL; } else { // the file is there; do something } #else // This seems to imply unix? .... #endif Previous Comments: --------------------------------------------------------------------------- [2000-12-23 23:28:07] troels@arvin.dk In PHP 4.0.4, pdf_open_image_file() makes PHP segfault. Things work fine in PHP 4.0.3pl1 with the exact same code and the exact same image. It doesn't matter if pdf_open_image_file() is used with either PNG og JPEG images. Other PHP-PDFlib functions seem to work well. At http://troels.arvin.dk/php-bugs/pdf/ I have put all relevant information: - The configure-command used - Output from the configure-command - Demonstration script code and demonstration image - GDB-backtrace For bug isolation, I compiled PHP in the CGI-version with the following configure-switches: ./configure --with-pdflib --without-mysql --disable-session --disable-xml --without-pcre-regex --with-ttf --with-gd --enable-debug It doesn't help if a more involved configure statement (adding --with-png-dir=..., etc.) is used. Involved software ------------------------ Operating system: Red Hat Linux 7 (on a PIII CPU system) with all official updates. (The problem also seems to exist on Red Hat 6.2 hosts). PDFlib: V. 3.02 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8394

« previous php.dev (#42436) next »