Fixes possible invalid writes on invalid files.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:[email protected]
---
libavcodec/rpza.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 2f09857..c859126 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -98,7 +98,7 @@ static void rpza_decode_stream(RpzaContext *s)
av_log(s->avctx, AV_LOG_ERROR, "MOV chunk size != encoded chunk size;
using MOV chunk size\n");
/* Number of 4x4 blocks in frame. */
- total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 4) / 4);
+ total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4);
/* Process chunk data */
while (bytestream2_get_bytes_left(&s->gb)) {
--
1.7.10.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel