gdImageChar* crash

Issue #57 resolved
Pierre Joye created an issue

gdFontTiny, Small, Large and Giant are 0x0 instead of a ptr to the font table.

Using current master and running php with bug19366.phpt f.e. reproduces the crash

Comments (5)

  1. Former user Account Deleted

    Could you try now? I suspect that it was the missing extern in header files which redefined the pointer to a local NULL value (which is default from C89 I think).

    ondrej@howl:~/Projects/pkg-php/php-src/ext/gd$ ldd modules/gd.so 
            linux-vdso.so.1 =>  (0x00007fff767ff000)
            libgd.so.3 => /usr/lib/x86_64-linux-gnu/libgd.so.3 (0x00007ff618702000)
            libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff618463000)
            libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff61823b000)
            libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff618024000)
            libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007ff617dea000)
            libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1 (0x00007ff617b4a000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff6177c0000)
            libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007ff61754d000)
            libXpm.so.4 => /usr/lib/x86_64-linux-gnu/libXpm.so.4 (0x00007ff61733b000)
            libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff617104000)
            libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff616e82000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff616c65000)
            /lib64/ld-linux-x86-64.so.2 (0x00007ff618b9f000)
            liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff616a42000)
            libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007ff616834000)
            libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff6164f7000)
            libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff6162cd000)
            libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff6160c9000)
            libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff615ea8000)
            libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff615ca5000)
            libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff615aa0000)
    ondrej@howl:~/Projects/pkg-php/php-src/ext/gd$ ./run-test.sh tests/bug19366.phpt 
    --TEST--
    Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd))
    --SKIPIF--
    --FILE--
    Alive: create image
    Alive: Define colors
    Alive: Draw
    Alive: ImageString
    Alive: Send to browser
    Alive: Free resources
    Alive: Done
    --EXPECT--
    Alive: create image
    Alive: Define colors
    Alive: Draw
    Alive: ImageString
    Alive: Send to browser
    Alive: Free resources
    Alive: Done
    
  2. Log in to comment