Add check for unsigned integer underflow in seeking code
This commit is contained in:
parent
81c973fa1c
commit
bef0c92d05
@ -3383,7 +3383,12 @@ FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 s
|
||||
* frame, try again. This is very inefficient but shouldn't
|
||||
* happen often, and a more efficient solution would require
|
||||
* quite a bit more code */
|
||||
upper_bound--;
|
||||
if(upper_bound > 0)
|
||||
upper_bound--;
|
||||
else {
|
||||
decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}else if(decoder->protected_->state == FLAC__STREAM_DECODER_ABORTED) {
|
||||
decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user