Re: [FFmpeg-devel] [PATCH 6/8] avcodec/movtextenc: Use av_fast_realloc_array

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > > -    if (s->count + 1 > FFMIN(SIZE_MAX / sizeof(*s- > >style_attributes), UINT16_MAX) || > -    !(tmp = av_fast_realloc(s->style_attributes, > -    &s- > >style_attributes_bytes_allocated,

[FFmpeg-devel] [PATCH 6/8] avcodec/movtextenc: Use av_fast_realloc_array

2022-07-05 Thread Andreas Rheinhardt
It has the advantage of not overallocating beyond the maximum amount of entries that can be potentially used (namely UINT16_MAX). Signed-off-by: Andreas Rheinhardt --- libavcodec/movtextenc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/movtextenc.c