Re: [FFmpeg-devel] [PATCH 1/4] avcodec/vvc/vvc_ps: Check before access

2024-02-19 Thread Nuo Mi
On Tue, Feb 20, 2024 at 7:24 AM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Andreas Rheinhardt: > > max_bin_idx can be at most LMCS_MAX_BIN_SIZE - 1 here, > > so pivot[LCMS_MAX_BIN_SIZE + 1] may be accessed, > > but pivot has only LCMS_MAX_BIN_SIZE + 1 elements > > (unless the va

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/vvc/vvc_ps: Check before access

2024-02-19 Thread Andreas Rheinhardt
Andreas Rheinhardt: > max_bin_idx can be at most LMCS_MAX_BIN_SIZE - 1 here, > so pivot[LCMS_MAX_BIN_SIZE + 1] may be accessed, > but pivot has only LCMS_MAX_BIN_SIZE + 1 elements > (unless the values of pivot were so that it is always > assured that pivot[LCMS_MAX_BIN_SIZE] is always < sample > (w

[FFmpeg-devel] [PATCH 1/4] avcodec/vvc/vvc_ps: Check before access

2024-02-18 Thread Andreas Rheinhardt
max_bin_idx can be at most LMCS_MAX_BIN_SIZE - 1 here, so pivot[LCMS_MAX_BIN_SIZE + 1] may be accessed, but pivot has only LCMS_MAX_BIN_SIZE + 1 elements (unless the values of pivot were so that it is always assured that pivot[LCMS_MAX_BIN_SIZE] is always < sample (which it is iff it is always < 2^