Opened 19 years ago

Closed 19 years ago

#1170 closed defect (fixed)

mapscript segfault when creating an unupported output format

Reported by: unicoletti Owned by: sgillies@…
Priority: high Milestone:
Component: MapScript-SWIG Version: 4.4
Severity: normal Keywords:
Cc:

Description

I have accidentally compile mapserver 4.4.0 without pdf support and then tried
to produce pdf output from Java mapscript.
The result is that the JVM crashes because of a segfault in native code. The
error is in the constructor of outputFormatObj which should be modified to
handle this situation more gracefully by launching an exception.

I attach a patch that fixes the problem.

Attachments (1)

outputFormat-segfault.patch (867 bytes ) - added by unicoletti 19 years ago.
The constructor throws an exception when an unsopported outputFormat is requested

Download all attachments as: .zip

Change History (2)

by unicoletti, 19 years ago

Attachment: outputFormat-segfault.patch added

The constructor throws an exception when an unsopported outputFormat is requested

comment:1 by sgillies@…, 19 years ago

Resolution: fixed
Status: newclosed
Thanks for pointing this out, Umberto.  Fixed.  Ideally, the errors should be set
in mapoutput.c, but for now this will do.  I wrote a new unit test so that we will
be able to look out for this in the future.

Committed to branch-4-4 and CVS HEAD.

Note: See TracTickets for help on using tickets.