[FFmpeg-devel] [PATCH] mss1: improve check if decoded pivot is invalid
Paul B Mahol
onemda at gmail.com
Sun Jul 15 01:58:53 CEST 2012
Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/mss1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index 302a5b8..4be7a1f 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -575,7 +575,7 @@ static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
val = arith_get_number(acoder, (base + 1) / 2 - 2) + 3;
}
- if (val == base) {
+ if ((unsigned)val >= base) {
ctx->corrupted = 1;
return 0;
}
--
1.7.7
More information about the ffmpeg-devel
mailing list