Validate merge argument in repacketizer_demo.
[opus.git] / 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;