Array out of bounds when saving/loading very short filenames
Bug #716236 reported by
Matt Giuca
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).
To post a comment you must log in.
Fixed in trunk r67.