anti-alias cartoline causes some map images to crash

Steve Lime steve.lime at DNR.STATE.MN.US
Mon Feb 13 11:45:17 EST 2006


Angus, et al... There is a problem in GD itself where some bounds checking
is not being done. This leads to buffer overflows. The GD folks are aware of
the problem and have stated it will be fixed in version 2.0.34. No word on
when that might be available nor why they are waiting on fixing such a 
serious bug.

Fortunately the fix is a one-liner. 

In gd.c,  function gdImageSetAAPixelColor() change:

int dr,dg,db,p,r,g,b;

p = gdImageGetPixel(im,x,y);

to:

int dr,dg,db,p,r,g,b;

if (!gdImageBoundsSafeMacro (im, x, y)) return;

p = gdImageGetPixel(im,x,y);

Steve


>>> Angus Scown <angus_scown at YAHOO.CO.UK> 02/11/06 2:42 AM >>>
I am using php mapscript to generate map tiles.  On
certain tiles the php process dies and apache returns
an error 500 (internal server error)

The apache error log has "Premature end of script
headers: php.exe" 

If I adjust some of the line sizes in my .map file the
tile may then render.  It seems to be chocking on
either the complexity of a geometry or the actual
anti-alias process.  98% of the tiles render well.  

How do I work out what is causing the crash? 
Currently I  think it might be the gd image render (to
PNG24) as if I turn of anti-alias and render to PNG
then all tiles generate correctly.  

Is there a way I can pinpoint what mapserver doesn't
like ?  I have both windows and linux boxes at my
disposal.  I can't seem to get php to give me any
extra error information but am working on my windows
box at present and can't seem to get php to tell me
any extra info.  Is there a way I get mapserver to
tell me at which point in the render process it fails?
 

I appreciate any assistance, and can provide further
information if required.  




	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com



More information about the mapserver-users mailing list