[med-svn] [Git][med-team/theseus][master] Fix string buffer size

Andreas Tille gitlab at salsa.debian.org
Wed Oct 10 07:04:15 BST 2018


Andreas Tille pushed to branch master at Debian Med / theseus


Commits:
4158fee6 by Andreas Tille at 2018-10-10T06:03:35Z
Fix string buffer size

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0005_stringbuffer.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+theseus (3.3.0-8) UNRELEASED; urgency=medium
+
+  * Fix string buffer size
+    Closes: #908459
+
+ -- Andreas Tille <tille at debian.org>  Wed, 10 Oct 2018 07:35:18 +0200
+
 theseus (3.3.0-7) unstable; urgency=medium
 
   [ Fabian Kloetzl ]


=====================================
debian/patches/0005_stringbuffer.patch
=====================================
@@ -0,0 +1,36 @@
+Description: Fix string buffer size
+Bug-Debian: https://bugs.debian.org/908459
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 10 Oct 2018 07:35:18 +0200
+
+--- a/libmsa/msa.c
++++ b/libmsa/msa.c
+@@ -608,7 +608,7 @@ MSA
+ {
+     int             i, j, cnt, dig;
+     int             len = 11;
+-    char            digit[len];
++    char            digit[len+1];
+ 
+     for(i = 0; i < msa->seqnum; ++i)
+         msa->name[i][len] = '\0';
+@@ -637,7 +637,7 @@ MSA
+                 }
+ 
+                 //printf("\n## %d %d %d %s %s  (%d,%d)", cnt, dig, len-dig, msa->name[i], msa->name[j], i ,j);
+-                strncpy(&msa->name[j][len-dig], digit, len);
++                strncpy(&msa->name[j][len-dig], digit, len+1);
+                 //printf("\n## %d %d %d %s %s\n", cnt, dig, len-dig, msa->name[i], msa->name[j]);
+                 ++cnt;
+             }
+--- a/MultiPose2MSA.c
++++ b/MultiPose2MSA.c
+@@ -156,7 +156,7 @@ Align2segID(PDBCdsArray *pdbA)
+     MSA            *msa = pdbA->seq2pdb->msa;
+     char           *seq = NULL;
+     int             resSeq = 0;
+-    char            alnindex[5];
++    char            alnindex[11];
+     PDBCds         *cdsi = NULL;
+ 
+     for (i = 0; i < cnum; ++i)


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@
 gcc-7.patch
 0003-fix-issues-uncovered-by-gcc8.patch
 0004-create-lib-dir.patch
+0005_stringbuffer.patch



View it on GitLab: https://salsa.debian.org/med-team/theseus/commit/4158fee696c0895292ca79aba55a32a752ba56d8

-- 
View it on GitLab: https://salsa.debian.org/med-team/theseus/commit/4158fee696c0895292ca79aba55a32a752ba56d8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20181010/d2f49192/attachment-0001.html>


More information about the debian-med-commit mailing list