aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/fate/h264-conformance-caba3_sony_c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-10-10 11:47:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-10-12 13:39:45 +0200
commitdef04022f4a7058f99e669bfd978d431d79aec18 (patch)
treec0de64bf5c0e095c0146f964ef0a01baa3dcedc7 /tests/ref/fate/h264-conformance-caba3_sony_c
parent223a2c2a6079a8a5a8bbaf4a7671f959a8dd8bc2 (diff)
downloadffmpeg-def04022f4a7058f99e669bfd978d431d79aec18.tar.gz
avcodec/zmbvenc: Correct offset in buffer
zmbvenc allocates a buffer for a picture with padding on all four sides: The stride is choosen so large that it already contains padding on the right; the height also includes padding rows. The padding on the right of each row is also reused as padding for the left of the next row. So one still needs to add padding on the left for the first row. This is done by offsetting the actual pointer used to access the picture from the pointer returned by av_mallocz and the formula for this offset was wrong, because it ignored that a pixel can take more than one byte when calculating the offset resulting from the left padding of the first row. This fixes accesses outside of the allocated buffer that were reported in tickets #7980 and #7994. No writes were ever attempted outside of the buffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tests/ref/fate/h264-conformance-caba3_sony_c')
0 files changed, 0 insertions, 0 deletions