On Tue, Feb 04, 2014 at 11:31:38AM +0100, Anton Khirnov wrote:
> 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)) {
> -- 

just do not introduce it in the first RPZA patch
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to