ref: 520894c6d165bc6ef182cd935f14f063900e6c87
parent: 13f3658bf8ade0d660c5f5632445d4a21d42c242
author: Janne Grunau <janne-vlc@jannau.net>
date: Fri Oct 19 07:01:06 EDT 2018
fuzzer: prevent unwanted integer promotion in r32le Fixes an undefined shift in clusterfuzz-testcase-minimized-dav1d_fuzzer-5685383740784640. Credits to oss-fuzz.
--- a/tests/libfuzzer/dav1d_fuzzer.c
+++ b/tests/libfuzzer/dav1d_fuzzer.c
@@ -33,7 +33,7 @@
#include <dav1d/dav1d.h>
static unsigned r32le(const uint8_t *const p) {
- return (p[3] << 24U) | (p[2] << 16U) | (p[1] << 8U) | p[0];
+ return ((uint32_t)p[3] << 24U) | (p[2] << 16U) | (p[1] << 8U) | p[0];
}
// expects ivf input