Array out of bounds when saving/loading very short filenames

Bug #716236 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HF-Lab
Fix Released
High
Matt Giuca

Bug Description

When reading (hf_io:readn_hf) or writing (hf_io:writen_hf) a heightfield file, the file extension is detected by inspecting the last four characters of the filename. If however the filename (including its extension) is less than four characters, it will read from before the start of the filename array.

This isn't a serious problem, as it will typically only mean that the file type cannot be determined (assuming it doesn't segfault for being at the start of a segment).

Tags: io
Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r67.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.