Validate merge argument in repacketizer_demo.
authorGregory Maxwell <greg@xiph.org>
Tue, 19 Nov 2013 16:35:26 +0000 (08:35 -0800)
committerGregory Maxwell <greg@xiph.org>
Tue, 19 Nov 2013 16:35:26 +0000 (08:35 -0800)
src/repacketizer_demo.c

index ca8b2c7..dc05c1b 100644 (file)
@@ -81,6 +81,11 @@ int main(int argc, char *argv[])
             fprintf(stderr, "-merge parameter must be at least 1.\n");
             return EXIT_FAILURE;
          }
+         if(merge>48)
+         {
+            fprintf(stderr, "-merge parameter must be less than 48.\n");
+            return EXIT_FAILURE;
+         }
          i++;
       } else if (strcmp(argv[i], "-split")==0)
          split = 1;