[mapserver-dev] Corrupt index file causes a crash in mapserver

Tamas Szekeres szekerest at gmail.com
Sun Mar 10 05:18:45 PDT 2019


Hi Developers,

I've resurrected an old bug which has been closed as "wontfix", because we
have run into the same issue recently:

https://github.com/mapserver/mapserver/issues/2362

I don't think it is a good solution to leave mapserver in a memory
corrupted state instead of providing a meningful error message and safely
continue the operation. So I've created a pull request to provide a
solution for this particular use case, however as far as I see it might
also require some further investigation how a corrupted index file may
cause troubles to mapserver.

For example I wonder if the index contains a feature id greater than the
number of features, it may cause a buffer overrun in msSetBit (mapbits.c).
Also what happens if a part of a file is missing, so an offset to a
treenode points beyond the end of the file.

Best regards,

Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20190310/d9d3f6c3/attachment.html>


More information about the mapserver-dev mailing list