[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Test lowres

Michael Niedermayer michael at niedermayer.cc
Sun Jan 8 14:59:08 EET 2023


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 tools/target_dec_fuzzer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index a20345db5c..1725e30a5a 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -423,6 +423,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
         ctx->workaround_bugs = bytestream2_get_le32(&gbc);
 
+        if (c->p.max_lowres) {
+            ctx->lowres = bytestream2_get_byte(&gbc) % (c->p.max_lowres+1);
+        }
+
         if (extradata_size < size) {
             ctx->extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
             if (ctx->extradata) {
-- 
2.17.1



More information about the ffmpeg-devel mailing list