mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 22:00:51 +08:00
avformat/asfdec_f: Check amount of value read
Fixes: use of uninitialized memory
Fixes: 403675492/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-4754281823797248
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 fa197924a6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -239,8 +239,10 @@ static void get_tag(AVFormatContext *s, const char *key, int type, int len, int
|
||||
case ASF_UNICODE:
|
||||
avio_get_str16le(s->pb, len, value, 2 * len + 1);
|
||||
break;
|
||||
case -1: // ASCI
|
||||
avio_read(s->pb, value, len);
|
||||
case -1:; // ASCII
|
||||
int ret = ffio_read_size(s->pb, value, len);
|
||||
if (ret < 0)
|
||||
goto finish;
|
||||
value[len]=0;
|
||||
break;
|
||||
case ASF_BYTE_ARRAY:
|
||||
|
||||
Reference in New Issue
Block a user