[med-svn] r20736 - trunk/packages/rnahybrid/trunk/debian/patches

Andreas Tille tille at moszumanska.debian.org
Fri Dec 11 13:43:00 UTC 2015


Author: tille
Date: 2015-12-11 13:42:59 +0000 (Fri, 11 Dec 2015)
New Revision: 20736

Added:
   trunk/packages/rnahybrid/trunk/debian/patches/mayhem_check_if_file_exists.patch
Modified:
   trunk/packages/rnahybrid/trunk/debian/patches/series
Log:
Fix crashs reported by Mayhem 


Added: trunk/packages/rnahybrid/trunk/debian/patches/mayhem_check_if_file_exists.patch
===================================================================
--- trunk/packages/rnahybrid/trunk/debian/patches/mayhem_check_if_file_exists.patch	                        (rev 0)
+++ trunk/packages/rnahybrid/trunk/debian/patches/mayhem_check_if_file_exists.patch	2015-12-11 13:42:59 UTC (rev 20736)
@@ -0,0 +1,51 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 11 Dec 2015 13:36:53 +0100
+Bug-Debian: https://bugs.debian.org/715598
+            https://bugs.debian.org/715599
+Description: Check if file exists before opening
+
+--- a/src/rnacalibrate.c
++++ b/src/rnacalibrate.c
+@@ -17,7 +17,8 @@
+ #include <time.h>
+ #include <math.h>
+ #include <stdlib.h>
+-
++#include <string.h>
++#include <unistd.h>
+ 
+ static char const rcsid[] = "$Id: rnacalibrate.c,v 1.11 2004/11/16 15:42:33 marc Exp $";
+ 
+@@ -111,6 +112,10 @@ int main(int argc, char **argv)
+     case 'd':
+       dflag = 1;
+       freq_filename = optarg;
++      if( access( freq_filename, F_OK ) == -1 ) {
++        fprintf(stderr, "No such file %s\n", freq_filename);
++        errflag = 1;
++      }
+       break;
+     case 'f':
+       fflag=1;
+--- a/src/rnaeffective.c
++++ b/src/rnaeffective.c
+@@ -18,7 +18,7 @@
+ #include <math.h>
+ #include <stdlib.h>
+ #include <string.h>
+-
++#include <unistd.h>
+ 
+ static char const rcsid[] = "$Id: rnaeffective.c,v 1.6 2004/11/16 15:41:12 marc Exp $";
+ 
+@@ -115,6 +115,10 @@ int main(int argc, char **argv)
+     case 'd':
+       dflag = 1;
+       freq_filename = optarg;
++      if( access( freq_filename, F_OK ) == -1 ) {
++        fprintf(stderr, "No such file %s\n", freq_filename);
++        errflag = 1;
++      }
+       break;
+     case 'f':
+       fflag=1;

Modified: trunk/packages/rnahybrid/trunk/debian/patches/series
===================================================================
--- trunk/packages/rnahybrid/trunk/debian/patches/series	2015-12-11 12:39:07 UTC (rev 20735)
+++ trunk/packages/rnahybrid/trunk/debian/patches/series	2015-12-11 13:42:59 UTC (rev 20736)
@@ -1 +1,4 @@
 gcc-4.8.patch
+hardening.patch
+fixmanpage.patch
+mayhem_check_if_file_exists.patch




More information about the debian-med-commit mailing list