Bug#691107: Possible fix

Jesse Smith jessefrgsmith at yahoo.ca
Mon Oct 22 17:33:02 UTC 2012


I believe I have found the problem and (I hope) a fix. Sorry for
spamming everyone's inbox today.

The problem seems to stem from the strcpy() command overflowing when
copying one character into a two-character string. It seems as though
GCC is treating the characters in the source string as being larger than
one byte each, so to great around the overflow I've increased the size
of the destination buffer.

I've tested this using GCC 4.6 and GCC 4.7 and both are giving me
executables that run okay.

Attached I've included a patch. Please apply it to src/atanks.cpp and
let me know if it works. Assuming this fixes the issue I'll include the
patch in the next release of Atanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: atanks_cpp.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20121022/7f4fa2a8/attachment.bin>


More information about the Pkg-games-devel mailing list