[mapserver-dev] 5.4 beta-1 tomorrow?

Steve Lime Steve.Lime at dnr.state.mn.us
Wed Feb 18 00:14:11 EST 2009


I'm pretty sure this is ok. Could either set size to 1 or set the scale to 1 if the sizey is
0. Some code in mapgd.c does just that. The latter would be less risky but more work.

Steve

>>> Tamas Szekeres <szekerest at gmail.com> 02/17/09 4:20 PM >>>
Steve,

I'd be in favour of fixing the division by zero problem I've reported
previously (see below) before the beta.
However I'm waiting for someone who confirms that there would be no negative
impact on setting the symbol sizex/sizey to 1 instead of 0 by default.

Best regards,
Tamas



---------- Forwarded message ----------
From: Tamas Szekeres <szekerest at gmail.com>
Date: 2009/2/15
Subject: Division by zero problem in mapserver
To: MapServer Dev Mailing List <mapserver-dev at lists.osgeo.org>


Hi Devs,

I find in many places in the code the following fragment:

scale = size/symbol->sizey;

without actually checking the value of symbol->sizey which may be zero
eventually. This causes me unexpected problems, like for example a premature
termination of the application during the pdf output.
How about setting the symbol size to 1 instead of 0 in initSymbol to prevent
from this problem?

Best regards,

Tamas



2009/2/17 Steve Lime <Steve.Lime at dnr.state.mn.us>

> Show of hands please... ;-)
>
> Steve
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>



More information about the mapserver-dev mailing list