ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sun 
May 15 22:46:12 2022 +0200| [cb5be590cd115b7831c9cbcfe4961a7e8ff65420] | 
committer: Michael Niedermayer

avformat/jpegxl_probe: Check init_get_bits8() for failure

Fixes: missing error check
Fixes: CID1504270

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb5be590cd115b7831c9cbcfe4961a7e8ff65420
---

 libavformat/jpegxl_probe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/jpegxl_probe.c b/libavformat/jpegxl_probe.c
index 9cd00da194..3de002f004 100644
--- a/libavformat/jpegxl_probe.c
+++ b/libavformat/jpegxl_probe.c
@@ -250,8 +250,11 @@ int ff_jpegxl_verify_codestream_header(const uint8_t *buf, 
int buflen)
     int xyb_encoded = 1, have_icc_profile = 0;
     uint32_t num_extra_channels;
     uint64_t extensions;
+    int ret;
 
-    init_get_bits8(gb, buf, buflen);
+    ret = init_get_bits8(gb, buf, buflen);
+    if (ret < 0)
+        return ret;
 
     if (jxl_bits(16) != FF_JPEGXL_CODESTREAM_SIGNATURE_LE)
         return -1;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to