AudioVisualWaveform: implement same size check as AudioPlaybackCache to prevent index out of bounds crashes

This commit is contained in:
itsmattkc
2020-11-24 11:02:42 +11:00
parent 2c4f781e13
commit 827c9f93cc
+4
View File
@@ -151,6 +151,10 @@ void AudioVisualWaveform::Shift(const rational &from, const rational &to)
return;
}
if (from_index > data_.size()) {
return;
}
if (from_index > to_index) {
// Shifting backwards <-
int copy_sz = data_.size() - from_index;