1 |
tupone 10/11/04 08:20:12 |
2 |
|
3 |
Added: ucon64-2.0.0-ovflfix.patch |
4 |
Log: |
5 |
Fix overflow. Bug #337889 |
6 |
|
7 |
(Portage version: 2.1.9.24/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ucon64-2.0.0-ovflfix.patch |
16 |
=================================================================== |
17 |
--- backup/lynxit.c.old 2010-11-04 09:07:18.000000000 +0100 |
18 |
+++ backup/lynxit.c 2010-11-04 09:08:17.000000000 +0100 |
19 |
@@ -561,7 +561,7 @@ |
20 |
return FALSE; |
21 |
} |
22 |
|
23 |
- if (strcmp (header.magic, "LYNX") != 0) |
24 |
+ if (memcmp (header.magic, "LYNX", sizeof(header.magic)) != 0) |
25 |
{ |
26 |
MESSAGE (("ERROR : %s is not a lynx image\n", filename)); |
27 |
fclose (fp); |
28 |
@@ -682,7 +682,7 @@ |
29 |
#endif |
30 |
|
31 |
memset (&header, 0, sizeof (st_lnx_header_t)); |
32 |
- strcpy (header.magic, MAGIC_STRING); |
33 |
+ memcpy (header.magic, MAGIC_STRING, sizeof(header.magic)); |
34 |
strcpy (header.cartname, cartname); |
35 |
strcpy (header.manufname, manufname); |
36 |
header.page_size_bank0 = cart_analyse (BANK0); |