mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
avformat/img2dec: zero probe buffer
Fixes use of uninitialized memory Fixes valgrind failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0cc8a62a78
commit
1f361124d9
@ -361,6 +361,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
||||
ret = avio_read(f[0], header, PROBE_BUF_MIN);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
memset(header + ret, 0, sizeof(header) - ret);
|
||||
avio_skip(f[0], -ret);
|
||||
pd.buf = header;
|
||||
pd.buf_size = ret;
|
||||
|
Loading…
Reference in New Issue
Block a user