dca: fix misaligned access in avpriv_dca_convert_bitstream
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Tue, 12 Jan 2016 23:52:58 +0000 (00:52 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 28 Jan 2016 01:15:49 +0000 (02:15 +0100)
commit859a348e44d7f9f67c948a21aa3c5856de392ac5
tree4ed9cfb893302a6d3091b5170f4f55e6437484cc
parent368a1803ff840c187f396ad014fce30190a3ffe3
dca: fix misaligned access in avpriv_dca_convert_bitstream

src and dst are only 8-bit-aligned, so 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

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 44ac13eed49593f4f8efdb72ab0d5b48e05aa305)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/dca.c