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:
cd4739c
)
matroskadec: check realloc in lzo encoding
author
Luca Barbato
<lu_zero@gentoo.org>
Fri, 14 Sep 2012 16:39:58 +0000
(18:39 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Wed, 19 Sep 2012 18:34:13 +0000
(20:34 +0200)
Make all the compression encodings behave the same way.
libavformat/matroskadec.c
patch
|
blob
|
history
diff --git
a/libavformat/matroskadec.c
b/libavformat/matroskadec.c
index
95130fc
..
bb505c2
100644
(file)
--- a/
libavformat/matroskadec.c
+++ b/
libavformat/matroskadec.c
@@
-999,7
+999,11
@@
static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
case MATROSKA_TRACK_ENCODING_COMP_LZO:
do {
olen = pkt_size *= 3;
- pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
+ newpktdata = av_realloc(pkt_data, pkt_size + AV_LZO_OUTPUT_PADDING);
+ if (!newpktdata) {
+ goto failed;
+ }
+ pkt_data = newpktdata;
result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
} while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
if (result)