[Mapserver-dev] Mapserver Bug Report

woodbri at swoodbridge.com woodbri at swoodbridge.com
Tue Feb 3 10:32:29 EST 2004


Hi all,

I have been able to track down a problem I was having working with 
Navtech data. It seems that they generate shapefiles for some layers 
that appear to have valid dbf files that do not have any attribute 
fields defined in them.

I looks like when these are acessed via a tileindex there is some 
kind of memory overwrite happening. I had a streets layer that was 
defined after this offending layer that was acting weird like all 
that attributes were off by one or were being pulled from the wrong 
column. When I commented out this layer everything when back to 
normal.

OK, reading some code looks like mapxbase.c is not checking for the 
case where nFields = 0 and is doing a bunch of malloc on zero bytes 
and then stuffing values into those zero byte locations.

I'll write a bug on this also and while you might argue that I should 
not have a dbf without attributes, I don't see any reason I shouldn't 
but this is a nasty memory overwrite condition that I have been 
fighting with off and on for 3 weeks and needs to be fixed one way or 
another.

-Steve W.



More information about the mapserver-dev mailing list