mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avformat/iff: Check the CMAP read size
Fixes: use of uninitialized memory Fixes: 5bX0wHRp9uuN Use of uninitialized memory Replicated through UnModified FFmpeg (ffprobe) with Valgrind Found during triage of the security report fo0u77U9tJ8g
This commit is contained in:
1 parent
489c5905e9
commit
bda6ec0d52
1 file changed
+1
-1
+1
-1
@@ -568,7 +568,7 @@ static int iff_read_header(AVFormatContext *s)
|
||||
data_size + IFF_EXTRA_VIDEO_SIZE);
|
||||
if (res < 0)
|
||||
return res;
|
||||
if ((res = avio_read(pb, stv->codecpar->extradata + IFF_EXTRA_VIDEO_SIZE, data_size)) < 0) {
|
||||
if ((res = ffio_read_size(pb, stv->codecpar->extradata + IFF_EXTRA_VIDEO_SIZE, data_size)) < 0) {
|
||||
av_freep(&stv->codecpar->extradata);
|
||||
stv->codecpar->extradata_size = 0;
|
||||
return res;
|
||||
|
||||
Reference in new issue
Block a user