ffmpeg | branch: release/4.4 | Michael Niedermayer <[email protected]> | 
Mon Feb 15 21:29:11 2021 +0100| [419f62c9029da43d5565d294196af69f04a0cf3a] | 
committer: Michael Niedermayer

avformat/vividas: Use equals check with n in read_sb_block()

Fixes: OOM
Fixes: 
27780/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5097985075314688

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit e44214a8242bc12fa2c86fcc8b0abd2053f1c8f9)
Signed-off-by: Michael Niedermayer <[email protected]>

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

 libavformat/vividas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index d745770dc4..603d01a2dc 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -267,7 +267,7 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned 
*size,
     *size = n;
     n -= 8;
 
-    if (avio_read(src, buf+8, n) < n) {
+    if (avio_read(src, buf+8, n) != n) {
         av_free(buf);
         return NULL;
     }

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to