gdImageScale segfaults with most interpolation types

Issue #86 resolved
Chris Reuter
created an issue

gdImageScale() will cause a segmentation fault unless the interpolation method (set via gdImageSetInterpolationMethod()) is one of GD_BILINEAR_FIXED, GD_BICUBIC_FIXED or GD_NEAREST_NEIGHBOUR.

In addition, setting mode GD_WEIGHTED4 will not segfault but will cause gdImageScale() to return 0.

Attached is a small program which reproduces the bug. It was run under Ubuntu 12.04/i686.

LibGD was compiled with:

./configure --prefix=/usr/local/ --with-tiff=/usr/lib/ --with-xpm=/usr/lib/
sudo make install

Comments (4)

  1. Log in to comment