[FFmpeg-devel] [PATCH] avcodec/cbs_av1: fix array size for ar_coeffs_cb_plus_128 and ar_coeffs_cr_plus_128

Michael Niedermayer michael at niedermayer.cc
Thu Dec 12 01:15:14 EET 2019


On Wed, Dec 11, 2019 at 07:00:06PM -0300, James Almer wrote:
> Taking into account the code
> 
> fb(2, ar_coeff_lag);
> num_pos_luma = 2 * current->ar_coeff_lag * (current->ar_coeff_lag + 1);
> if (current->num_y_points)
>     num_pos_chroma = num_pos_luma + 1;
> else
>     num_pos_chroma = num_pos_luma;
> 
> Max value for ar_coeff_lag is 3 (two bits), for num_pos_luma 24, and for
> num_pos_chroma 25.
> 
> Both ar_coeffs_cb_plus_128 and ar_coeffs_cr_plus_128 may have up to
> num_pos_chroma values.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/cbs_av1.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

LGTM and i should have realized this when i looked at the fuzzer case 
 
thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191212/4c3aa373/attachment.sig>


More information about the ffmpeg-devel mailing list