fix buffer overflow of wrap_buffer (may fix #5221)
git-svn-id: svn://localhost/ardour2/branches/3.0@13715 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d61d7019e6
commit
c311be7523
@ -618,7 +618,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, framecn
|
||||
as our current_playback_buffer.
|
||||
*/
|
||||
|
||||
assert(wrap_buffer_size >= chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1]);
|
||||
assert(wrap_buffer_size >= necessary_samples);
|
||||
|
||||
/* Copy buf[0] from playback_buf */
|
||||
memcpy ((char *) chaninfo->playback_wrap_buffer,
|
||||
@ -1954,7 +1954,7 @@ AudioDiskstream::allocate_temporary_buffers ()
|
||||
*/
|
||||
|
||||
double const sp = max (fabsf (_actual_speed), 1.2f);
|
||||
framecnt_t required_wrap_size = (framecnt_t) floor (_session.get_block_size() * sp) + 1;
|
||||
framecnt_t required_wrap_size = (framecnt_t) ceil (_session.get_block_size() * sp) + 2;
|
||||
|
||||
if (required_wrap_size > wrap_buffer_size) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user