1 |
xarthisius 10/10/04 17:02:08 |
2 |
|
3 |
Added: 6.1.3-overflows.patch |
4 |
Log: |
5 |
Fix buffer overflows wrt bug 339706. Thanks to Diego for the report. |
6 |
|
7 |
(Portage version: 2.1.9.13/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-libs/ccp4-libs/files/6.1.3-overflows.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/files/6.1.3-overflows.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/files/6.1.3-overflows.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: 6.1.3-overflows.patch |
16 |
=================================================================== |
17 |
Fix overflows and array subscript above array bounds |
18 |
|
19 |
http://bugs.gentoo.org/show_bug.cgi?id=339706 |
20 |
|
21 |
--- ccp4-6.1.3/lib/ccif/f_interface.c |
22 |
+++ ccp4-6.1.3/lib/ccif/f_interface.c |
23 |
@@ -926,7 +926,7 @@ |
24 |
#endif |
25 |
|
26 |
{ |
27 |
- char logname_c[81]; |
28 |
+ char logname_c[MAXFLEN]; |
29 |
size_t Length; |
30 |
int unit; |
31 |
CIF_FILE_LIST file_list_entry; |
32 |
@@ -4064,7 +4064,7 @@ |
33 |
#endif |
34 |
|
35 |
{ |
36 |
- char lognam_c[81], *blknam_c; |
37 |
+ char lognam_c[MAXFLEN], *blknam_c; |
38 |
size_t loglen, blklen; |
39 |
int i, j, new; |
40 |
|
41 |
--- ccp4-6.1.3/lib/src/ccp4_diskio_f.c |
42 |
+++ ccp4-6.1.3/lib/src/ccp4_diskio_f.c |
43 |
@@ -705,7 +705,7 @@ |
44 |
log_name = strdup("diskio.dft"); |
45 |
if (!(file_name = getenv(log_name))) |
46 |
file_name = log_name; |
47 |
- for ( *istrm = 1; *istrm == MAXFILES; *istrm++) |
48 |
+ for ( *istrm = 1; *istrm < MAXFILES; *istrm++) |
49 |
if (!strcmp(file_name,_ioChannels[*istrm]->iobj->name)) break; |
50 |
} |
51 |
if (*istrm != MAXFILES) { |