[FFmpeg-devel] [PATCH] mpeg4videodec: silence ubsan warning

Michael Niedermayer michael at niedermayer.cc
Fri Jan 15 03:17:24 CET 2016


On Fri, Jan 15, 2016 at 12:30:28AM +0100, Andreas Cadhalpun wrote:
> s->ac_val[0][0] is of type 'int16_t [16]', but points into a larger buffer.
> Here it is used as base pointer to find the correct position in the
> larger buffer by adding 's->block_index[n] * 16' and thus as 'int16_t *'.
> 
> This fixes clang's ubsan runtime error: index out of bounds for type
> 'int16_t [16]'
> 
> Fixes: test_case.mp4
> 
> Found-by: Tyson Smith <twsmith at mozilla.com>
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160115/06521fdf/attachment.sig>


More information about the ffmpeg-devel mailing list