projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9c6eec
)
gsmdec: log error message when output buffer is too small.
author
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 28 Oct 2011 04:34:52 +0000
(
00:34
-0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 2 Nov 2011 18:41:16 +0000
(14:41 -0400)
also return AVERROR(EINVAL) instead of -1
libavcodec/gsmdec.c
patch
|
blob
|
blame
|
history
diff --git
a/libavcodec/gsmdec.c
b/libavcodec/gsmdec.c
index
57286c7
..
26340c2
100644
(file)
--- a/
libavcodec/gsmdec.c
+++ b/
libavcodec/gsmdec.c
@@
-61,8
+61,10
@@
static int gsm_decode_frame(AVCodecContext *avctx, void *data,
int frame_bytes = avctx->frame_size *
av_get_bytes_per_sample(avctx->sample_fmt);
- if (*data_size < frame_bytes)
- return -1;
+ if (*data_size < frame_bytes) {
+ av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n");
+ return AVERROR(EINVAL);
+ }
*data_size = 0;
if(buf_size < avctx->block_align)
return AVERROR_INVALIDDATA;