php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29027 ImageCreateFromPNG() causes segfault
Submitted: 2004-07-06 02:21 UTC Modified: 2004-07-06 09:55 UTC
From: ajp at aripollak dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.7 OS: Red Hat Linux 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ajp at aripollak dot com
New email:
PHP Version: OS:

 

 [2004-07-06 02:21 UTC] ajp at aripollak dot com
Description:
------------
In PHP 4.3.6 and 4.3.7, with or without zend optimizer, PHP crashes on ImageCreateFromPNG() if a valid PNG file is specified. Backtrace follows:
#0  0x00000049 in ?? ()
#1  0x40218dcd in png_create_info_struct (png_ptr=0x49) at png.c:224
#2  0x0809f6d5 in gdImageCreateFromPngCtx (infile=0x84b76b4)
    at /home/ari/build/php-4.3.7/ext/gd/libgd/gd_png.c:149
#3  0x0809f5f2 in gdImageCreateFromPng (inFile=0x84bba60)
    at /home/ari/build/php-4.3.7/ext/gd/libgd/gd_png.c:90
#4  0x0808ff5f in _php_image_create_from (ht=139162860,
    return_value=0x84b750c, this_ptr=0x0, return_value_used=1, image_type=2,
    tn=0x81db9ab "PNG", func_p=0x809f5d8 <gdImageCreateFromPng>,
    ioctx_func_p=0x809f634 <gdImageCreateFromPngCtx>)
    at /home/ari/build/php-4.3.7/ext/gd/gd.c:1466
#5  0x08090128 in zif_imagecreatefrompng (ht=1, return_value=0x84b750c,
    this_ptr=0x0, return_value_used=1)
    at /home/ari/build/php-4.3.7/ext/gd/gd.c:1512
#6  0x405ab542 in zend_assign_to_variable_reference ()
   from /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
#7  0x405b4a02 in zend_oe ()
   from /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
#8  0x0813d59f in php_execute_script (primary_file=0xbfffdb20)
    at /home/ari/build/php-4.3.7/main/main.c:1731
#9  0x0816e473 in main (argc=2, argv=0xbfffdba4)
    at /home/ari/build/php-4.3.7/sapi/cgi/cgi_main.c:1592
#10 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6

This only happens with libpng 1.2.2 (or 1.2.5), but not with 1.0.13.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-06 09:55 UTC] derick@php.net
This has already been filed atleast 3 times, and it's not something we can fix. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 17:02:22 2024 UTC