public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Kacper Kowalik (xarthisius)" <xarthisius@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/ccp4-libs/files: 6.1.3-overflows.patch
Date: Mon,  4 Oct 2010 17:02:08 +0000 (UTC)	[thread overview]
Message-ID: <20101004170208.1765C20051@flycatcher.gentoo.org> (raw)

xarthisius    10/10/04 17:02:08

  Added:                6.1.3-overflows.patch
  Log:
  Fix buffer overflows wrt bug 339706. Thanks to Diego for the report.
  
  (Portage version: 2.1.9.13/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sci-libs/ccp4-libs/files/6.1.3-overflows.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/files/6.1.3-overflows.patch?rev=1.1&view=markup
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

Index: 6.1.3-overflows.patch
===================================================================
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) {






                 reply	other threads:[~2010-10-04 17:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101004170208.1765C20051@flycatcher.gentoo.org \
    --to=xarthisius@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox