[FFmpeg-cvslog] avcodec/apedec: tmpk==32 is not supported, prevent undefined behavior
Michael Niedermayer
git at videolan.org
Sat Apr 26 21:40:28 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 26 20:56:31 2014 +0200| [ebfe154bd52204a4da19d26d8d5ae0f8003558ac] | committer: Michael Niedermayer
avcodec/apedec: tmpk==32 is not supported, prevent undefined behavior
Fixes CID1206639
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebfe154bd52204a4da19d26d8d5ae0f8003558ac
---
libavcodec/apedec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 7e1c6bb..1fd41cd 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -529,7 +529,7 @@ static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice)
return AVERROR_INVALIDDATA;
}
x = range_decode_bits(ctx, tmpk);
- } else if (tmpk <= 32) {
+ } else if (tmpk <= 31) {
x = range_decode_bits(ctx, 16);
x |= (range_decode_bits(ctx, tmpk - 16) << 16);
} else {
More information about the ffmpeg-cvslog
mailing list