Opened 13 years ago

#3942 new defect

PHP/Mapscript : ImageObj->saveImage() crashes when driver is AGG

Reported by: fsimonin Owned by: aboudreault
Priority: normal Milestone:
Component: MapScript-PHP Version: 6.0
Severity: normal Keywords:
Cc:

Description

When using driver AGG, ImageObj->saveImage() - without parameters or with an empty file name - fails.

The issue is line 331 of image.c:

gdFree(iptr);

At this point, if the driver is AGG, iptr is not a gdImagePtr.

See attached test-case: when browsed, index.php should send an empty PNG image. Instead, you get an HTTP error 500.

Attachments (2)

agg.map (253 bytes ) - added by fsimonin 13 years ago.
Test-case: Minimal mapfile
index.php (126 bytes ) - added by fsimonin 13 years ago.
Test-case: Minimal PHP script

Download all attachments as: .zip

Change History (2)

by fsimonin, 13 years ago

Attachment: agg.map added

Test-case: Minimal mapfile

by fsimonin, 13 years ago

Attachment: index.php added

Test-case: Minimal PHP script

Note: See TracTickets for help on using tickets.