summaryrefslogtreecommitdiff
path: root/libavcodec/8svx.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-23 00:23:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-23 00:35:31 +0200
commit28d3738428128d0bf16ff23995b08b3289179478 (patch)
treea45fc603df658badc2cb3eef0da0b340d409ca4a /libavcodec/8svx.c
parent6c4cc0f640874f6098ef98bad54c3fc0fa7c615f (diff)
parentdcb9f6a20dbddd1f95b6b322fc4c5fd0b5315729 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: Add LATM demuxer avplay: flush audio decoder with empty packets at EOF if the decoder has CODEC_CAP_DELAY set. 8svx/iff: fix decoding of compressed stereo 8svx files. 8svx: log an error message if output buffer is too small 8svx: check packet size before reading the initial sample value. 8svx: output 8-bit samples instead of 16-bit. 8svx: split delta decoding into a separate function. mp4: Don't read an empty Decoder Config Descriptor fate.sh: Ignore errors from rm command during cleanup. fate.sh: Run git-pull in quiet mode to avoid console spam. Apple ProRes decoder rtmp: Make the input FLV parser handle data cut at any point rv34: Check for invalid slices offsets eval: test isnan(sqrt(-1)) instead of just sqrt(-1) Conflicts: Changelog libavcodec/8svx.c libavcodec/proresdec.c libavcodec/version.h libavformat/iff.c libavformat/version.h tests/ref/fate/eval Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/8svx.c')
-rw-r--r--libavcodec/8svx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 3864d61857..5c68d347e2 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -121,6 +121,10 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si
int buf_size = avpkt->size;
int n = esc->samples_size;
+ if (buf_size < 2) {
+ av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
+ return AVERROR(EINVAL);
+ }
if (!(deinterleaved_samples = av_mallocz(n)))
return AVERROR(ENOMEM);