summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-10-15 07:15:15 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-10-15 07:15:15 +0000
commit83567608910c5d1c1aa662bcdf78a08ef3d3e3cf (patch)
tree750fa3ce6630fa143fd7517d99d935d68bed624c /sci-biology/vienna-rna/files
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-83567608910c5d1c1aa662bcdf78a08ef3d3e3cf.tar.gz
gentoo-2-83567608910c5d1c1aa662bcdf78a08ef3d3e3cf.tar.bz2
gentoo-2-83567608910c5d1c1aa662bcdf78a08ef3d3e3cf.zip
Fix buffer overflows wrt bug 341089. Thanks to Diego for the report. Fix implicit function declarations. Drop old.
(Portage version: 2.2_rc92/cvs/Linux x86_64)
Diffstat (limited to 'sci-biology/vienna-rna/files')
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.7.2-disable-gd.patch16
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.3.patch79
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch331
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.8.4-implicits.patch47
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.8.4-overflows.patch26
5 files changed, 73 insertions, 426 deletions
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-disable-gd.patch b/sci-biology/vienna-rna/files/vienna-rna-1.7.2-disable-gd.patch
deleted file mode 100644
index 6b3bdefa6875..000000000000
--- a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-disable-gd.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-# unfortunately, vienna-rna's build system is a little broken and sometimes detects
-# gd in RNAforested but then realizes in g2 that it can't actually build it
-# resulting in unresolved symbols.
-
-diff -Naur ViennaRNA-1.7.2/RNAforester/configure.in ViennaRNA-1.7.2.new/RNAforester/configure.in
---- ViennaRNA-1.7.2/RNAforester/configure.in 2006-01-19 10:26:09.000000000 -0500
-+++ ViennaRNA-1.7.2.new/RNAforester/configure.in 2008-10-06 14:08:56.000000000 -0400
-@@ -31,7 +31,7 @@
- CPPFLAGS=["-Ig2-0.70/src/ -Lg2-0.70/ ${CPPFLAGS}"]
-
-
--AC_CHECK_LIB(gd,gdImageLine,,)
-+dnl AC_CHECK_LIB(gd,gdImageLine,,)
-
- dnl Checks for header files.
- AC_HEADER_STDC
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.3.patch b/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.3.patch
deleted file mode 100644
index 4f5bd37f3a77..000000000000
--- a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.3.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -Naur ViennaRNA-1.7/Cluster/AS_main.c ViennaRNA-1.7.new/Cluster/AS_main.c
---- ViennaRNA-1.7/Cluster/AS_main.c 2001-04-05 04:36:41.000000000 -0400
-+++ ViennaRNA-1.7.new/Cluster/AS_main.c 2008-08-28 10:53:11.000000000 -0400
-@@ -1,5 +1,6 @@
- #include <stdio.h>
- #include <string.h>
-+#include <stdlib.h>
- #include "distance_matrix.h"
- #include "statgeom.h"
- #include "split.h"
-diff -Naur ViennaRNA-1.7/Cluster/statgeom.c ViennaRNA-1.7.new/Cluster/statgeom.c
---- ViennaRNA-1.7/Cluster/statgeom.c 2001-04-05 04:36:41.000000000 -0400
-+++ ViennaRNA-1.7.new/Cluster/statgeom.c 2008-08-28 10:53:11.000000000 -0400
-@@ -7,6 +7,7 @@
- #include <stdio.h>
- #include <strings.h>
- #include <ctype.h>
-+#include <stdlib.h>
- #include "utils.h"
- #include "PS3D.h"
- #include "distance_matrix.h"
-diff -Naur ViennaRNA-1.7/Cluster/treeplot.c ViennaRNA-1.7.new/Cluster/treeplot.c
---- ViennaRNA-1.7/Cluster/treeplot.c 2001-04-05 04:36:41.000000000 -0400
-+++ ViennaRNA-1.7.new/Cluster/treeplot.c 2008-08-28 10:53:11.000000000 -0400
-@@ -1,6 +1,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
-+#include <stdlib.h>
- #include "distance_matrix.h"
- #include "utils.h"
-
-diff -Naur ViennaRNA-1.7/RNAforester/src/main.cpp ViennaRNA-1.7.new/RNAforester/src/main.cpp
---- ViennaRNA-1.7/RNAforester/src/main.cpp 2005-08-05 10:14:10.000000000 -0400
-+++ ViennaRNA-1.7.new/RNAforester/src/main.cpp 2008-08-28 10:53:11.000000000 -0400
-@@ -19,6 +19,8 @@
- #include <list>
- #include <sstream>
- #include <string>
-+#include <cstring>
-+#include <climits>
- #include <map>
-
- //#include <sys/timeb.h>
-diff -Naur ViennaRNA-1.7/RNAforester/src/ppforestbase.h ViennaRNA-1.7.new/RNAforester/src/ppforestbase.h
---- ViennaRNA-1.7/RNAforester/src/ppforestbase.h 2006-05-08 07:49:33.000000000 -0400
-+++ ViennaRNA-1.7.new/RNAforester/src/ppforestbase.h 2008-08-28 10:53:11.000000000 -0400
-@@ -16,6 +16,7 @@
-
- #include <algorithm>
- #include <cassert>
-+#include <cstring>
-
- #include "misc.h"
- #include "types.h"
-diff -Naur ViennaRNA-1.7/RNAforester/src/rna_algebra.h ViennaRNA-1.7.new/RNAforester/src/rna_algebra.h
---- ViennaRNA-1.7/RNAforester/src/rna_algebra.h 2004-09-01 17:55:22.000000000 -0400
-+++ ViennaRNA-1.7.new/RNAforester/src/rna_algebra.h 2008-08-28 10:53:11.000000000 -0400
-@@ -3,6 +3,8 @@
-
- #include <assert.h>
- #include <algorithm>
-+#include <cstring>
-+#include <climits>
-
- #include "algebra.h"
- #include "debug.h"
-diff -Naur ViennaRNA-1.7/Readseq/ureadseq.c ViennaRNA-1.7.new/Readseq/ureadseq.c
---- ViennaRNA-1.7/Readseq/ureadseq.c 2002-11-27 06:23:56.000000000 -0500
-+++ ViennaRNA-1.7.new/Readseq/ureadseq.c 2008-08-28 10:53:11.000000000 -0400
-@@ -16,7 +16,7 @@
- *
- */
-
--
-+#include <stdlib.h>
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch b/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch
deleted file mode 100644
index 3ba7e636ccfa..000000000000
--- a/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch
+++ /dev/null
@@ -1,331 +0,0 @@
-diff -ur ViennaRNA-1.7.2.orig/Kinfold/main.c ViennaRNA-1.7.2/Kinfold/main.c
---- ViennaRNA-1.7.2.orig/Kinfold/main.c 2006-11-24 10:13:55.000000000 +0200
-+++ ViennaRNA-1.7.2/Kinfold/main.c 2009-07-30 11:27:39.000000000 +0300
-@@ -27,7 +27,7 @@
- /* PRIVAT FUNCTIONS */
- static void ini_energy_model(void);
- static void read_data(void);
--static char *getline(FILE *fp);
-+static char *v_getline(FILE *fp);
- static void clean_up(void);
-
- /**/
-@@ -133,7 +133,7 @@
- /*
- read sequence
- */
-- ctmp = getline(stdin);
-+ ctmp = v_getline(stdin);
- len = strlen(ctmp);
- GAV.farbe = (char *)calloc(len+1, sizeof(char));
- assert(GAV.farbe != NULL);
-@@ -153,7 +153,7 @@
- read start structure
- */
- if (GTV.start) {
-- ctmp = getline(stdin);
-+ ctmp = v_getline(stdin);
- len = strlen(ctmp);
- sscanf(ctmp, "%s", GAV.startform);
-
-@@ -174,7 +174,7 @@
- */
- if (GTV.stop) {
- s = GAV.stopform;
-- while (( ctmp = getline(stdin))) {
-+ while (( ctmp = v_getline(stdin))) {
- *s = (char *)calloc(GSV.len+1, sizeof(char));
- sscanf(ctmp, "%s", *s);
-
-@@ -207,7 +207,7 @@
- }
-
- /**/
--static char *getline(FILE *fp) {
-+static char *v_getline(FILE *fp) {
- char s[512], *line, *cp;
-
- line = NULL;
-diff -ur ViennaRNA-1.7.2.orig/Readseq/ureadseq.c ViennaRNA-1.7.2/Readseq/ureadseq.c
---- ViennaRNA-1.7.2.orig/Readseq/ureadseq.c 2002-11-27 13:23:56.000000000 +0200
-+++ ViennaRNA-1.7.2/Readseq/ureadseq.c 2009-07-30 11:29:35.000000000 +0300
-@@ -136,12 +136,12 @@
- }
- }
-
--Local void getline(struct ReadSeqVars *V)
-+Local void v_getline(struct ReadSeqVars *V)
- {
- readline(V->f, V->s, &V->linestart);
- }
-
--Local void ungetline(struct ReadSeqVars *V)
-+Local void unv_getline(struct ReadSeqVars *V)
- {
- fseek(V->f, V->linestart, 0);
- }
-@@ -215,7 +215,7 @@
-
- if (addfirst) addseq(V->s, V);
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
- V->done |= (*endTest)( &addend, &ungetend, V);
- if (V->addit && (addend || !V->done) && (strlen(V->s) > margin)) {
-@@ -226,7 +226,7 @@
- if (V->choice == kListSequences) addinfo(V->seqid, V);
- else {
- V->allDone = (V->nseq >= V->choice);
-- if (V->allDone && ungetend) ungetline(V);
-+ if (V->allDone && ungetend) unv_getline(V);
- }
- }
-
-@@ -246,7 +246,7 @@
-
- while (!V->allDone) {
- do {
-- getline(V);
-+ v_getline(V);
- for (si= V->s; *si != 0 && *si < ' '; si++) *si= ' '; /* drop controls */
- if (*si == 0) *V->s= 0; /* chop line to empty */
- } while (! (feof(V->f) || ((*V->s != 0) && (*V->s != ';') ) ));
-@@ -272,13 +272,13 @@
- { /* ? only 1 seq/file ? */
-
- while (!V->allDone) {
-- getline(V);
-+ v_getline(V);
- if (strstr(V->s,"; DNA sequence ") == V->s)
- strcpy(V->seqid, (V->s)+16);
- else
- strcpy(V->seqid, (V->s)+1);
- while ((!feof(V->f)) && (*V->s == ';')) {
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- else readLoop(0, true, endStrider, V);
-@@ -298,16 +298,16 @@
-
- while (!V->allDone) {
- while (! (feof(V->f) || strstr(V->s,"ENTRY") || strstr(V->s,"SEQUENCE")) )
-- getline(V);
-+ v_getline(V);
- strcpy(V->seqid, (V->s)+16);
- while (! (feof(V->f) || strstr(V->s,"SEQUENCE") == V->s))
-- getline(V);
-+ v_getline(V);
- readLoop(0, false, endPIR, V);
-
- if (!V->allDone) {
- while (! (feof(V->f) || ((*V->s != 0)
- && (strstr( V->s,"ENTRY") == V->s))))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -327,13 +327,13 @@
- while (!V->allDone) {
- strcpy(V->seqid, (V->s)+12);
- while (! (feof(V->f) || strstr(V->s,"ORIGIN") == V->s))
-- getline(V);
-+ v_getline(V);
- readLoop(0, false, endGB, V);
-
- if (!V->allDone) {
- while (! (feof(V->f) || ((*V->s != 0)
- && (strstr( V->s,"LOCUS") == V->s))))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -364,11 +364,11 @@
- {
- while (!V->allDone) {
- strcpy(V->seqid, (V->s)+4);
-- getline(V); /*skip title-junk line*/
-+ v_getline(V); /*skip title-junk line*/
- readLoop(0, false, endNBRF, V);
- if (!V->allDone) {
- while (!(feof(V->f) || (*V->s != 0 && *V->s == '>')))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -390,7 +390,7 @@
- readLoop(0, false, endPearson, V);
- if (!V->allDone) {
- while (!(feof(V->f) || ((*V->s != 0) && (*V->s == '>'))))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -410,14 +410,14 @@
- while (!V->allDone) {
- strcpy(V->seqid, (V->s)+5);
- do {
-- getline(V);
-+ v_getline(V);
- } while (!(feof(V->f) | (strstr(V->s,"SQ ") == V->s)));
-
- readLoop(0, false, endEMBL, V);
- if (!V->allDone) {
- while (!(feof(V->f) |
- ((*V->s != '\0') & (strstr(V->s,"ID ") == V->s))))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -437,13 +437,13 @@
- /*! 1st string is Zuker's Fortran format */
-
- while (!V->allDone) {
-- getline(V); /*s == "seqLen seqid string..."*/
-+ v_getline(V); /*s == "seqLen seqid string..."*/
- strcpy(V->seqid, (V->s)+6);
- readLoop(0, false, endZuker, V);
- if (!V->allDone) {
- while (!(feof(V->f) |
- ((*V->s != '\0') & (*V->s == '('))))
-- getline(V);
-+ v_getline(V);
- }
- if (feof(V->f)) V->allDone = true;
- }
-@@ -486,7 +486,7 @@
- do {
- addseq(V->s, V);
- V->done = feof(V->f);
-- getline(V);
-+ v_getline(V);
- } while (!V->done);
- if (V->choice == kListSequences) addinfo(V->seqid, V);
- V->allDone = true;
-@@ -498,7 +498,7 @@
- /*
- 10nov91: Reading GCG files casued duplication of last line when
- EOF followed that line !!!
-- fix: getline now sets *V->s = 0
-+ fix: v_getline now sets *V->s = 0
- */
- char *si;
-
-@@ -512,7 +512,7 @@
- else if (si = strstr(V->seqid,"..")) *si = 0;
- do {
- V->done = feof(V->f);
-- getline(V);
-+ v_getline(V);
- if (!V->done) addseq((V->s), V);
- } while (!V->done);
- if (V->choice == kListSequences) addinfo(V->seqid, V);
-@@ -531,7 +531,7 @@
- if (V->addit) V->seqlen = 0;
- rewind(V->f); V->nseq= 0;
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
-
- if (V->done && !(*V->s)) break;
-@@ -614,7 +614,7 @@
- if (V->addit) V->seqlen = 0;
- rewind(V->f); V->nseq= 0;
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
-
- if (V->done && !(*V->s)) break;
-@@ -685,7 +685,7 @@
- domatch= (V->matchchar > 0);
-
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
-
- if (V->done && !(*V->s)) break;
-@@ -766,7 +766,7 @@
- /* rewind(V->f); V->nseq= 0; << do in caller !*/
- indata= true; /* call here after we find "matrix" */
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
-
- if (V->done && !(*V->s)) break;
-@@ -851,7 +851,7 @@
- /* fprintf(stderr,"Phylip-ileaf: topnseq=%d topseqlen=%d\n",V->topnseq, V->topseqlen); */
-
- do {
-- getline(V);
-+ v_getline(V);
- V->done = feof(V->f);
-
- if (V->done && !(*V->s)) break;
-@@ -904,7 +904,7 @@
- while (isdigit(*si)) si++;
- skipwhitespace(si);
- V->topseqlen= atol(si);
-- getline(V);
-+ v_getline(V);
- while (!V->allDone) {
- V->seqlencount= 0;
- strncpy(V->seqid, (V->s), 10);
-@@ -935,10 +935,10 @@
- V->err = eFileNotFound;
- else {
-
-- for (l = skiplines_; l > 0; l--) getline( V);
-+ for (l = skiplines_; l > 0; l--) v_getline( V);
-
- do {
-- getline( V);
-+ v_getline( V);
- for (l= strlen(V->s); (l > 0) && (V->s[l] == ' '); l--) ;
- } while ((l == 0) && !feof(V->f));
-
-@@ -963,7 +963,7 @@
- char *cp;
- /* rewind(V->f); V->nseq= 0; ?? assume it is at top ?? skiplines ... */
- while (!done) {
-- getline( V);
-+ v_getline( V);
- tolowerstr( V->s);
- if (strstr( V->s, "matrix")) done= true;
- if (strstr( V->s, "interleav")) interleaved= true;
-@@ -995,7 +995,7 @@
- break;
-
- case kFitch :
-- strcpy(V->seqid, V->s); getline(V);
-+ strcpy(V->seqid, V->s); v_getline(V);
- readFitch(V);
- break;
-
-@@ -1003,7 +1003,7 @@
- do {
- gotuw = (strstr(V->s,"..") != NULL);
- if (gotuw) readUWGCG(V);
-- getline(V);
-+ v_getline(V);
- } while (!(feof(V->f) || V->allDone));
- break;
- }
-diff -ur ViennaRNA-1.7.2.orig/RNAforester/src/rnafuncs.cpp ViennaRNA-1.7.2/RNAforester/src/rnafuncs.cpp
---- ViennaRNA-1.7.2.orig/RNAforester/src/rnafuncs.cpp 2005-08-05 13:52:50.000000000 +0300
-+++ ViennaRNA-1.7.2/RNAforester/src/rnafuncs.cpp 2009-07-30 11:26:47.000000000 +0300
-@@ -1,3 +1,5 @@
-+#include <cstdio>
-+
- #include <algorithm>
- #include <cctype>
- #include <iomanip>
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.8.4-implicits.patch b/sci-biology/vienna-rna/files/vienna-rna-1.8.4-implicits.patch
new file mode 100644
index 000000000000..e6a3b87456a5
--- /dev/null
+++ b/sci-biology/vienna-rna/files/vienna-rna-1.8.4-implicits.patch
@@ -0,0 +1,47 @@
+Fix implicit function declarations and attempt to free non-heap obj
+
+--- lib/subopt.c
++++ lib/subopt.c
+@@ -80,12 +80,12 @@
+ #include <string.h>
+ #include <math.h>
+ #include "fold.h"
++#include "cofold.h"
+ #include "utils.h"
+ #include "energy_par.h"
+ #include "fold_vars.h"
+ #include "pair_mat.h"
+ #include "list.h"
+-#include "subopt.h"
+ #include "params.h"
+
+ #define true 1
+--- Progs/RNAfold.c
++++ Progs/RNAfold.c
+@@ -20,6 +20,7 @@
+ #include "MEA.h"
+ extern void read_parameter_file(const char fname[]);
+ extern plist * stackProb(double cutoff);
++extern void init_pf_circ_fold(int length);
+
+ /*@unused@*/
+ static char UNUSED rcsid[] = "$Id: vienna-rna-1.8.4-implicits.patch,v 1.1 2010/10/15 07:15:15 xarthisius Exp $";
+--- Cluster/AS_main.c
++++ Cluster/AS_main.c
+@@ -1,6 +1,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include "distance_matrix.h"
+ #include "statgeom.h"
+ #include "split.h"
+@@ -226,7 +227,7 @@
+ for(j=0;j<nn[i];j++) free(ss[i][j]);
+ free(ss[i]);
+ }
+- free(ss);
++ // free(ss); // attempt to free a non-heap object ‘ss’
+ }
+ else {
+ printf_taxa_list();
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.8.4-overflows.patch b/sci-biology/vienna-rna/files/vienna-rna-1.8.4-overflows.patch
new file mode 100644
index 000000000000..fcaa5f9a53b6
--- /dev/null
+++ b/sci-biology/vienna-rna/files/vienna-rna-1.8.4-overflows.patch
@@ -0,0 +1,26 @@
+Fix buffer overflows
+
+http://bugs.gentoo.org/show_bug.cgi?id=341089
+
+--- Readseq/ureadseq.c
++++ Readseq/ureadseq.c
+@@ -1579,7 +1579,7 @@
+
+ short linesout = 0, seqtype = kNucleic;
+ long i, j, l, l1, ibase;
+- char idword[31], endstr[10];
++ char idword[31], endstr[15];
+ char seqnamestore[128], *seqname = seqnamestore;
+ char s[kMaxseqwidth], *cp;
+ char nameform[10], numform[10], nocountsymbols[10];
+--- lib/part_func_up.c
++++ lib/part_func_up.c
+@@ -1438,7 +1438,7 @@
+ PUBLIC int plot_free_pu_out(pu_out* res, interact *pint, char *ofile, char *head) {
+ int size,s,i,len;
+ double dG_u;
+- char nan[4], *time, startl[2], dg[10];;
++ char nan[4], *time, startl[3], dg[10];;
+ FILE *wastl;
+
+ wastl = fopen(ofile,"a");