AudioVisualWaveform: implement same size check as AudioPlaybackCache to prevent index out of bounds crashes
This commit is contained in:
@@ -151,6 +151,10 @@ void AudioVisualWaveform::Shift(const rational &from, const rational &to)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (from_index > data_.size()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (from_index > to_index) {
|
if (from_index > to_index) {
|
||||||
// Shifting backwards <-
|
// Shifting backwards <-
|
||||||
int copy_sz = data_.size() - from_index;
|
int copy_sz = data_.size() - from_index;
|
||||||
|
|||||||
Reference in New Issue
Block a user