MapServer / MapServer-import

3 stars 2 forks source link

mapscript segfault when creating an unupported output format #1170

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: unicoletti Date: 2005/01/18 - 10:31

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.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2005/01/20 - 03:11

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.