projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80bdf7e
)
ra144dec: log an error message when output buffer is too small.
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 14 Sep 2011 18:24:59 +0000
(14:24 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 10 Oct 2011 15:38:58 +0000
(11:38 -0400)
also return AVERROR(EINVAL) instead of -1.
libavcodec/ra144dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/ra144dec.c
b/libavcodec/ra144dec.c
index
6707601
..
f026e24
100644
(file)
--- a/
libavcodec/ra144dec.c
+++ b/
libavcodec/ra144dec.c
@@
-72,8
+72,10
@@
static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
GetBitContext gb;
out_size = NBLOCKS * BLOCKSIZE * av_get_bytes_per_sample(avctx->sample_fmt);
- if (*data_size < out_size)
- return -1;
+ if (*data_size < out_size) {
+ av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n");
+ return AVERROR(EINVAL);
+ }
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,