Add bounds checking to map->isFoo() functions.
authorGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 15:12:41 +0000 (16:12 +0100)
committerGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 15:12:41 +0000 (16:12 +0100)
commit6e619747ccdd2c07666ebf9f16254d8ccd2b5373
tree80ee51ecb2be52a1db934857ae42d087fb8bc626
parent63e6c2b2872abb1ef6f68ba7664d7bfb9574c3b8
Add bounds checking to map->isFoo() functions.

The Address Sanitizer found a possible out of bounds read while playing
Blobwars:

src/CMap.cpp:147:15: runtime error: index 300 out of bounds for type 'unsigned char [300]'
src/CMap.cpp:117:16: runtime error: index 300 out of bounds for type 'unsigned char [300]'
src/CMap.cpp
src/CMap.h