diff options
Diffstat (limited to 'sci-libs/ccp4-libs/files/6.1.3-overflows.patch')
-rw-r--r-- | sci-libs/ccp4-libs/files/6.1.3-overflows.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sci-libs/ccp4-libs/files/6.1.3-overflows.patch b/sci-libs/ccp4-libs/files/6.1.3-overflows.patch new file mode 100644 index 000000000000..0e3c941d1cc2 --- /dev/null +++ b/sci-libs/ccp4-libs/files/6.1.3-overflows.patch @@ -0,0 +1,35 @@ +Fix overflows and array subscript above array bounds + +http://bugs.gentoo.org/show_bug.cgi?id=339706 + +--- ccp4-6.1.3/lib/ccif/f_interface.c ++++ ccp4-6.1.3/lib/ccif/f_interface.c +@@ -926,7 +926,7 @@ + #endif + + { +- char logname_c[81]; ++ char logname_c[MAXFLEN]; + size_t Length; + int unit; + CIF_FILE_LIST file_list_entry; +@@ -4064,7 +4064,7 @@ + #endif + + { +- char lognam_c[81], *blknam_c; ++ char lognam_c[MAXFLEN], *blknam_c; + size_t loglen, blklen; + int i, j, new; + +--- ccp4-6.1.3/lib/src/ccp4_diskio_f.c ++++ ccp4-6.1.3/lib/src/ccp4_diskio_f.c +@@ -705,7 +705,7 @@ + log_name = strdup("diskio.dft"); + if (!(file_name = getenv(log_name))) + file_name = log_name; +- for ( *istrm = 1; *istrm == MAXFILES; *istrm++) ++ for ( *istrm = 1; *istrm < MAXFILES; *istrm++) + if (!strcmp(file_name,_ioChannels[*istrm]->iobj->name)) break; + } + if (*istrm != MAXFILES) { |