avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overread
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 6 Dec 2021 11:20:21 +0000 (12:20 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Tue, 11 Jan 2022 14:15:52 +0000 (15:15 +0100)
commit0066e79c9eca8611ff425221bc54a58969ca606f
tree8d77f586a56e8754a62e3d542164e1cff3f91ea6
parentd1f7a44e89fa90748a71c7d714c53036a2a44800
avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overread

av_image_copy() expects an array of four pointers and linesizes
according to its declaration; it currently only pointers that are
actually in use (depending upon the pixel format), but this might
change at any time. It has already happened for the linesizes in
d7bc52bf456deba0f32d9fe5c288ec441f1ebef5 and so increasing their
array fixes a stack-buffer overread.

This fixes a -Wstringop-overflow= and -Wstringop-overread warning
from GCC 11.2.

Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit b0b90100bfda8c5cf95889e00183589de0abce60)
libavcodec/libopenh264dec.c