shithub: dav1d

Download patch

ref: 44cd6e25c96cd705b5611079bc17bc151f527549
parent: 16ce8b1a34cd868499a384faaad111d15d12a02e
author: Martin Storsjö <martin@martin.st>
date: Fri Nov 2 19:03:47 EDT 2018

dav1d: Only return 0/1 from md5_verify

This makes the process exit codes more sensible when failing
verification; when there's a mismatch, memcmp returns the difference
between the two first differing bytes, which can fall outside of the
range of normal exit codes, into the range of exit codes used when
terminated by a signal.

--- a/tools/output/md5.c
+++ b/tools/output/md5.c
@@ -234,7 +234,7 @@
         }
     }
 
-    return memcmp(abcd, md5->abcd, sizeof(abcd));
+    return !!memcmp(abcd, md5->abcd, sizeof(abcd));
 }
 
 const Muxer md5_muxer = {