[x264-devel] [Git][videolan/x264][master] checkasm: Correctly parse the seed argument as unsigned

Anton Mitrofanov (@BugMaster) gitlab at videolan.org
Wed Sep 29 21:33:57 UTC 2021



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
d2907f67 by Martin Storsjö at 2021-09-29T21:29:41+00:00
checkasm: Correctly parse the seed argument as unsigned

This fixes rerunning checkasm with an earlier printed seed, when
it's outside of the signed range.

- - - - -


1 changed file:

- tools/checkasm.c


Changes:

=====================================
tools/checkasm.c
=====================================
@@ -2958,7 +2958,7 @@ REALIGN_STACK int main( int argc, char **argv )
         argv++;
     }
 
-    int seed = ( argc > 1 ) ? atoi(argv[1]) : x264_mdate();
+    unsigned seed = ( argc > 1 ) ? strtoul(argv[1], NULL, 0) : x264_mdate();
     fprintf( stderr, "x264: using random seed %u\n", seed );
     srand( seed );
 



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/d2907f67227cbf38ac957efed84c532b12ce19cc

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/d2907f67227cbf38ac957efed84c532b12ce19cc
You're receiving this email because of your account on code.videolan.org.




More information about the x264-devel mailing list