Bug#715590: [Mayhem] Bug report on m2vrequantiser: M2VRequantiser crashes with exit status 139

Bernhard Übelacker bernhardu at vr-web.de
Thu Jul 3 09:55:00 UTC 2014


Dear Maintainer,
this crash happens when only one command line argument is given.
(e.g. "M2VRequantiser --help" or as from the bug opener "M2VRequantiser --NN)


--- m2vrequantiser-1.1.orig/main.c
+++ m2vrequantiser-1.1/main.c
@@ -2315,7 +2315,7 @@ int main (int argc, const char * argv[])
        if (argc < 5) { USAGE }
        delta_bright = atoi(argv[4]);
 #else
-       if (argc < 2) { USAGE }
+       if (argc < 3) { USAGE }
 #endif
        fact_x = atof(argv[1]);
        sscanf(argv[2], "%lld", &orim2vsize);


The sscanf above accesses argv on index 2 (third element) - this way it it crashing.
This is intended to be prevented in the changed line where I think the comparison
with argc is off by one.


Kind regards,
Bernhard



More information about the pkg-multimedia-maintainers mailing list