[Freeciv-Dev] (PR#13458) horrendous buffer underflows in mapgen.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13458 >
mapgen.c is rife with buffer underflows. The problem is it does all
sorts of lookups on terrains of type T_UNKNOWN. This doesn't normally
cause any assertion because there's no bounds check in get_terrain. And
it doesn't cause a valgrind error because the terrains array is static
(not on the heap or the stack) so (on my machine anyway) it's not an
invalid read.
With the attached patch however you can see the error. The assertion
fails a lot, and in other places valgrind will probably give warnings.
This is a bug in 2.0 and the development version. PR#13442 addresses it
to some extent for the development version.
-jason
- [Freeciv-Dev] (PR#13458) horrendous buffer underflows in mapgen.c,
Jason Short <=
|
|