Commit 44bed4b3 authored by Lyndon Brown's avatar Lyndon Brown Committed by Rémi Denis-Courmont

codec/araw: Fix Dat12 decode buffer overflow

Dat12 decode is a 12bit=>16bit conversion, and the output buffer is sized
based upon 16bit samples. However, the decoder function casts the output
buffer pointer to a 32bit type, meaning that half of the output thus ends
up being written past the end of the buffer.
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 8e564ce5
......@@ -625,7 +625,7 @@ static int16_t dat12tos16( uint_fast16_t y )
static void DAT12Decode( void *outp, const uint8_t *in, unsigned samples )
{
int32_t *out = outp;
int16_t *out = outp;
while( samples >= 2 )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment