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>
This commit is contained in:
parent
23c60ce742
commit
fa197924a6
1 changed files with 4 additions and 2 deletions
|
|
@ -240,8 +240,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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue