[med-svn] r20775 - in trunk/packages/mlv-smile/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Wed Dec 16 10:18:25 UTC 2015


Author: tille
Date: 2015-12-16 10:18:24 +0000 (Wed, 16 Dec 2015)
New Revision: 20775

Added:
   trunk/packages/mlv-smile/trunk/debian/patches/mayhem.patch
Modified:
   trunk/packages/mlv-smile/trunk/debian/changelog
   trunk/packages/mlv-smile/trunk/debian/patches/series
Log:
Fix issues reported by Mayhem


Modified: trunk/packages/mlv-smile/trunk/debian/changelog
===================================================================
--- trunk/packages/mlv-smile/trunk/debian/changelog	2015-12-16 08:37:38 UTC (rev 20774)
+++ trunk/packages/mlv-smile/trunk/debian/changelog	2015-12-16 10:18:24 UTC (rev 20775)
@@ -3,6 +3,7 @@
   * Moved debian/upstream to debian/upstream/metadata
   * cme fix dpkg-control
   * Fix clean target
+  * Fix issues reported by Mayhem
 
  -- Andreas Tille <tille at debian.org>  Tue, 15 Dec 2015 23:08:41 +0100
 

Added: trunk/packages/mlv-smile/trunk/debian/patches/mayhem.patch
===================================================================
--- trunk/packages/mlv-smile/trunk/debian/patches/mayhem.patch	                        (rev 0)
+++ trunk/packages/mlv-smile/trunk/debian/patches/mayhem.patch	2015-12-16 10:18:24 UTC (rev 20775)
@@ -0,0 +1,237 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 15 Dec 2015 23:08:41 +0100
+Bug-Debian: https://bugs.debian.org/
+            https://bugs.debian.org/
+            https://bugs.debian.org/
+Description: Fix issues reported by Mayhem
+
+--- a/P_BLOCS/Spell/src/spell.c
++++ b/P_BLOCS/Spell/src/spell.c
+@@ -1058,22 +1058,49 @@ Symbole         *alphaseq;
+ 
+ posarg  = 4;
+ 
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs a float specifying quorum as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
++
+ /* QUORUM                                                                     */
+ quorum = atof(argv[posarg++]);
+ 
+ /* BLOCS                                                                      */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying blocs as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
++
+ criteres.bloc = atoi(argv[posarg++]);
+ allocBloc(&criteres, criteres.bloc);
+ 
+ /* LONGUEUR MIN                                                               */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying longueur min as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ criteres.longueur.min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* LONGUEUR MAX                                                               */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying longueur max as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    } 
+ criteres.longueur.max = (LongSeq)atoi(argv[posarg++]);
+  if ( criteres.longueur.max == 0 )
+    infini = 1;
+ 
+ /* ERREURS GLOBALES                                                           */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying erreurs globales as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    } 
+ criteres.maxerr = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* PARAMETRES BLOCS ***********************************************************/
+@@ -1083,23 +1110,48 @@ if(criteres.bloc > 1)
+         {
+ 
+ /* LONGUEUR MIN BLOC                                                          */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying longueur min bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.longbloc[i].min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* LONGUEUR MAX BLOC                                                          */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying longueur max bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.longbloc[i].max = (LongSeq)atoi(argv[posarg++]);
+         if ( criteres.longbloc[i].max == 0 )
+           infini = 1;
+         maxlongmod += criteres.longbloc[i].max;
+ 
+ /* ERREURS BLOC                                                               */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying erreurs bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.maxerrblocs[i] = atoi(argv[posarg++]);
+ 
+         if(i != criteres.bloc-1 )
+             {
+ /* SAUT MIN BLOC                                                              */
++            if(argc <= posarg+1)
++                {
++                fprintf(stderr, "Usage: %s needs an int specifying saut min bloc as %dth argument.\n", argv[0], posarg+1);
++                return 1;
++                }
+             criteres.saut[i].min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* SAUT MAX BLOC                                                              */
++            if(argc <= posarg+1)
++                {
++                fprintf(stderr, "Usage: %s needs an int specifying saut max bloc as %dth argument.\n", argv[0], posarg+1);
++                return 1;
++                }
+             criteres.saut[i].max = (LongSeq)atoi(argv[posarg++]);
+             
+             maxlongsaut += criteres.saut[i].max;
+@@ -1119,7 +1171,6 @@ if(criteres.bloc > 1)
+  
+ 
+ 
+-
+ /******************************************************************************/
+ /* TRAITEMENT DES SEQUENCES                                                   */
+ /******************************************************************************/
+--- a/P_BLOCS+DELTA/Spell/src/spell.c
++++ b/P_BLOCS+DELTA/Spell/src/spell.c
+@@ -1351,23 +1351,48 @@ Symbole         *alphaseq;
+ posarg  = 4;
+ 
+ /* QUORUM                                                                     */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs a float specifying quorum as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ quorum = atof(argv[posarg++]);
+ 
+ /* BLOCS                                                                      */
+ criteres.bloc = atoi(argv[posarg++]);
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying blocs as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ if(criteres.bloc < 2)
+     fatalError("Incorrect boxes number\n");
+ allocBloc(&criteres, criteres.bloc);
+ 
+ /* LONGUEUR MIN                                                               */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying longueur min as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ criteres.longueur.min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* LONGUEUR MAX                                                               */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying longueur max as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ criteres.longueur.max = (LongSeq)atoi(argv[posarg++]);
+  if ( criteres.longueur.max == 0 )
+    infini = 1;
+ 
+ /* ERREURS GLOBALES                                                           */
++if(argc <= posarg+1)
++    {
++    fprintf(stderr, "Usage: %s needs an int specifying erreurs globales as %dth argument.\n", argv[0], posarg+1);
++    return 1;
++    }
+ criteres.maxerr = (LongSeq)atoi(argv[posarg++]);
+ 
+ maxlongmodel    = 0;
+@@ -1379,28 +1404,58 @@ if(criteres.bloc > 1)
+         {
+ 
+ /* LONGUEUR MIN BLOC                                                          */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying longueur min bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.longbloc[i].min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* LONGUEUR MAX BLOC                                                          */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying longueur max bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.longbloc[i].max = (LongSeq)atoi(argv[posarg++]);
+         if ( criteres.longbloc[i].max == 0 )
+           infini = 1;
+         maxlongmodel += criteres.longbloc[i].max;
+ 
+ /* ERREURS BLOC                                                               */
++        if(argc <= posarg+1)
++            {
++            fprintf(stderr, "Usage: %s needs an int specifying erreurs bloc as %dth argument.\n", argv[0], posarg+1);
++            return 1;
++            }
+         criteres.maxerrblocs[i] = atoi(argv[posarg++]);
+ 
+         if(i != criteres.bloc-1 )
+             {
+ /* SAUT MIN BLOC                                                              */
++            if(argc <= posarg+1)
++                {
++                fprintf(stderr, "Usage: %s needs an int specifying saut min bloc as %dth argument.\n", argv[0], posarg+1);
++                return 1;
++                }
+             criteres.saut[i].min = (LongSeq)atoi(argv[posarg++]);
+ 
+ /* SAUT MAX BLOC                                                              */
++            if(argc <= posarg+1)
++                {
++                fprintf(stderr, "Usage: %s needs an int specifying saut max bloc as %dth argument.\n", argv[0], posarg+1);
++                return 1;
++                }
+             criteres.saut[i].max = (LongSeq)atoi(argv[posarg++]);
+             
+             maxlongsaut += criteres.saut[i].max;
+ 
+ /* DELTA BLOC                                                                 */
++            if(argc <= posarg+1)
++                {
++                fprintf(stderr, "Usage: %s needs an int specifying delta bloc as %dth argument.\n", argv[0], posarg+1);
++                return 1;
++                }
+             criteres.delta[i] = (LongSeq) atoi(argv[posarg++]);
+             }
+         }
+--- a/SigStat/grep+/Spell/src/criteres.c
++++ b/SigStat/grep+/Spell/src/criteres.c
+@@ -412,6 +412,8 @@ Flag    chargeCriteres(P_Criteres cr, ch
+ {
+ int     i,tmp, tmp2;
+ 
++if (!line || strlen(line) < 1)
++    return FAUX;
+ tmp = atoi(strtok(line,"% ")); /* Nb blocs */
+ if(tmp < 1)
+     return FAUX;

Modified: trunk/packages/mlv-smile/trunk/debian/patches/series
===================================================================
--- trunk/packages/mlv-smile/trunk/debian/patches/series	2015-12-16 08:37:38 UTC (rev 20774)
+++ trunk/packages/mlv-smile/trunk/debian/patches/series	2015-12-16 10:18:24 UTC (rev 20775)
@@ -1,3 +1,4 @@
 Makefile.patch
 although.patch
 misc.patch
+mayhem.patch




More information about the debian-med-commit mailing list