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:
e524f37
)
dct: Check memory allocation
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Sun, 31 May 2015 12:53:31 +0000
(14:53 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Sun, 31 May 2015 13:03:30 +0000
(15:03 +0200)
libavcodec/dct.c
patch
|
blob
|
history
diff --git
a/libavcodec/dct.c
b/libavcodec/dct.c
index
4dbbff8
..
180477e
100644
(file)
--- a/
libavcodec/dct.c
+++ b/
libavcodec/dct.c
@@
-191,6
+191,8
@@
av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
s->costab = ff_cos_tabs[nbits + 2];
s->csc2 = av_malloc(n / 2 * sizeof(FFTSample));
+ if (!s->csc2)
+ return AVERROR(ENOMEM);
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
av_free(s->csc2);