On Mon, 20 Jan 2014 11:25:37 +0100, Luca Barbato <[email protected]> wrote:
> The tile 0 cannot depend on a previous one.
> Prevent an out of array bound load in ff_hevc_cabac_init().
> 
> Sample-Id: 00001406-google
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: [email protected]
> ---
>  libavcodec/hevc.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index d5175f5..2ef53db 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
> @@ -2292,6 +2292,11 @@ static int hls_slice_data(HEVCContext *s)
>      int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs];
>      int ret;
>  
> +    if (!ctb_addr_ts && s->sh.dependent_slice_segment_flag) {
> +        av_log(s->avctx, AV_LOG_ERROR, "Impossible initial tile.\n");
> +        return AVERROR_INVALIDDATA;
> +    }
> +

I don't think this is the right place.
It should be detected during slice header parsing.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to