diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 15:11:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 15:11:34 +0200 |
commit | b96dc093eaf3adaf5df80559cbbaba00d1708adf (patch) | |
tree | 81ed0d099ff08881dde2451de4f5a7b119d272fd /libavcodec/lagarith.c | |
parent | 8672fc7b0453098d862bb1c0caafab4823ee0b4e (diff) | |
parent | 065b3a1cfa3f23aedf76244b3f3883ba913173ff (diff) | |
download | ffmpeg-b96dc093eaf3adaf5df80559cbbaba00d1708adf.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
wmalosslessdec: increase channel_coeffs/residues size
wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
lagarith: check count before writing zeros.
wmaprodec: check num_vec_coeffs for validity
avidec: use actually read size instead of requested size
avidec: return 0, not packet size from read_packet().
Conflicts:
libavcodec/lagarith.c
libavcodec/wmalosslessdec.c
libavcodec/wmaprodec.c
libavformat/avidec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lagarith.c')
-rw-r--r-- | libavcodec/lagarith.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 09ae402e5c..261e39c21f 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -365,10 +365,11 @@ static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst, output_zeros: if (l->zeros_rem) { count = FFMIN(l->zeros_rem, width - i); - if(end - dst < count) { - av_log(l->avctx, AV_LOG_ERROR, "too many zeros remaining\n"); + if (end - dst < count) { + av_log(l->avctx, AV_LOG_ERROR, "Too many zeros remaining.\n"); return AVERROR_INVALIDDATA; } + memset(dst, 0, count); l->zeros_rem -= count; dst += count; |