Commit e9611bff authored by Tristan Matthews's avatar Tristan Matthews Committed by Rémi Denis-Courmont

araw: add assertion to check for buffer overrun

Refs #9343
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 7163c4b9
...@@ -738,8 +738,10 @@ static block_t *Encode( encoder_t *enc, block_t *in ) ...@@ -738,8 +738,10 @@ static block_t *Encode( encoder_t *enc, block_t *in )
if( encode != NULL ) if( encode != NULL )
encode( out->p_buffer, in->p_buffer, in->i_nb_samples encode( out->p_buffer, in->p_buffer, in->i_nb_samples
* enc->fmt_out.audio.i_channels ); * enc->fmt_out.audio.i_channels );
else else {
assert( out->i_buffer >= in->i_buffer );
memcpy( out->p_buffer, in->p_buffer, in->i_buffer ); memcpy( out->p_buffer, in->p_buffer, in->i_buffer );
}
return out; return out;
} }
......
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