OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b31a9c
)
avformat/iff: fix memleak of packet
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 15 Dec 2013 00:32:48 +0000
(
01:32
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 15 Dec 2013 00:44:04 +0000
(
01:44
+0100)
Fixes: msan_uninit-mem_7f65b9788da6_388_24.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/iff.c
patch
|
blob
|
history
diff --git
a/libavformat/iff.c
b/libavformat/iff.c
index
03c4b08
..
b5751c5
100644
(file)
--- a/
libavformat/iff.c
+++ b/
libavformat/iff.c
@@
-462,7
+462,9
@@
static int iff_read_packet(AVFormatContext *s,
buf = pkt->data;
bytestream_put_be16(&buf, 2);
ret = avio_read(pb, buf, iff->body_size);
- if (ret>=0 && ret < iff->body_size)
+ if (ret<0) {
+ av_free_packet(pkt);
+ } else if (ret < iff->body_size)
av_shrink_packet(pkt, ret + 2);
} else {
av_assert0(0);