Commit 9e4927fc authored by Rémi Duraffort's avatar Rémi Duraffort

Fix allocation size mismatch (cid #1047373)

parent a18b713d
......@@ -716,10 +716,10 @@ static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )
p_sys->i_samples_delay += p_aout_buf->i_nb_samples;
/* Convert samples to FLAC__int32 */
if( p_sys->i_buffer < p_aout_buf->i_buffer * 2 )
if( p_sys->i_buffer < p_aout_buf->i_buffer * sizeof(FLAC__int32) )
{
p_sys->p_buffer =
xrealloc( p_sys->p_buffer, p_aout_buf->i_buffer * 2 );
xrealloc( p_sys->p_buffer, p_aout_buf->i_buffer * sizeof(FLAC__int32) );
p_sys->i_buffer = p_aout_buf->i_buffer * 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