avcodec/jpeglsdec: Check ilv for being a supported value
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 25 Oct 2017 22:02:56 +0000 (00:02 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 31 Jan 2018 21:56:14 +0000 (22:56 +0100)
Fixes: 1773/clusterfuzz-testcase-minimized-4832523987189760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fe533628b9604e2f8e5179d5c5dd17c3cb764265)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeglsdec.c

index 20b4044..60701d6 100644 (file)
@@ -438,6 +438,10 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
         avpriv_report_missing_feature(s->avctx, "Sample interleaved images");
         ret = AVERROR_PATCHWELCOME;
         goto end;
+    } else { /* unknown interleaving */
+        avpriv_report_missing_feature(s->avctx, "Unknown interleaved images");
+        ret = AVERROR_PATCHWELCOME;
+        goto end;
     }
 
     if (s->xfrm && s->nb_components == 3) {