History

avformat/vqf: Check avio_read() in add_metadata()

Fixes: use of uninitialized data Fixes: 383825642/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5380168801124352

Michael Niedermayer committed 1 year ago

Commit c43dbec1 parent 54897da1 file · +2 −1Browse files

Unified · Split

libavformat/vqf.c+2−1
@@ -63,7 +63,8 @@ static void add_metadata(AVFormatContext *s, uint32_t tag, · 62 unmodified lines
6363 buf = av_malloc(len+1);
6464 if (!buf)
6565 return;
66− avio_read(s->pb, buf, len);
66+ if (len != avio_read(s->pb, buf, len))
67+ return;
6768 buf[len] = 0;
6869 AV_WL32(key, tag);
6970 av_dict_set(&s->metadata, key, buf, AV_DICT_DONT_STRDUP_VAL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t