track: ensure copies are within bounds

This commit is contained in:
itsmattkc
2022-09-30 16:01:36 -07:00
parent 76e0e2bd13
commit df0a52b3c6
+1 -1
View File
@@ -684,7 +684,7 @@ void Track::ProcessAudioTrack(const NodeValueRow &value, const NodeGlobals &glob
}
}
qint64 copy_length = qMin(max_dest_sz, qint64(samples_from_this_block.sample_count()));
qint64 copy_length = qMin(max_dest_sz, qint64(samples_from_this_block.sample_count() - destination_offset));
// Copy samples into destination buffer
for (int i=0; i<samples_from_this_block.audio_params().channel_count(); i++) {