dca: fix misaligned access in ff_dca_convert_bitstream
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Tue, 12 Jan 2016 23:56:39 +0000 (00:56 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 15 Jan 2016 12:47:11 +0000 (13:47 +0100)
commitb06cb15b9d7928bf54b639c9f9f7658c2c38bfb9
tree9494f620d9756d1b69c3729d4abf875f4ecd6732
parent9cdddb93bb33c58a5d42239326bc5eae0067366a
dca: fix misaligned access in ff_dca_convert_bitstream

The function is used on unaligned buffers (such as those provided
by AVPacket), accessing them as uint16_t causes SIGBUS crashes on
architectures like SPARC.

This fixes ubsan runtime error: load of misaligned address for type
'const uint16_t', which requires 2 byte alignment

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/dca.c