diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2010-11-04 08:20:12 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2010-11-04 08:20:12 +0000 |
commit | b8f76ed85428a1221f05adccc9a0df15a57bc449 (patch) | |
tree | d7072139f4074cb655a25a44982e1b3f3a2ad64b /games-util/ucon64/files | |
parent | Fixed glib issue, bug #318569. (diff) | |
download | gentoo-2-b8f76ed85428a1221f05adccc9a0df15a57bc449.tar.gz gentoo-2-b8f76ed85428a1221f05adccc9a0df15a57bc449.tar.bz2 gentoo-2-b8f76ed85428a1221f05adccc9a0df15a57bc449.zip |
Fix overflow. Bug #337889
(Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'games-util/ucon64/files')
-rw-r--r-- | games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch b/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch new file mode 100644 index 000000000000..0a1668f2d09f --- /dev/null +++ b/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch @@ -0,0 +1,20 @@ +--- backup/lynxit.c.old 2010-11-04 09:07:18.000000000 +0100 ++++ backup/lynxit.c 2010-11-04 09:08:17.000000000 +0100 +@@ -561,7 +561,7 @@ + return FALSE; + } + +- if (strcmp (header.magic, "LYNX") != 0) ++ if (memcmp (header.magic, "LYNX", sizeof(header.magic)) != 0) + { + MESSAGE (("ERROR : %s is not a lynx image\n", filename)); + fclose (fp); +@@ -682,7 +682,7 @@ + #endif + + memset (&header, 0, sizeof (st_lnx_header_t)); +- strcpy (header.magic, MAGIC_STRING); ++ memcpy (header.magic, MAGIC_STRING, sizeof(header.magic)); + strcpy (header.cartname, cartname); + strcpy (header.manufname, manufname); + header.page_size_bank0 = cart_analyse (BANK0); |