input/rewind, archive/iso9660: use use std::cmp_*() for safe integer comparison

This commit is contained in:
Max Kellermann
2024-03-11 15:09:56 +01:00
parent b0cfdfa257
commit d685d693e8
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ RewindInputStream::Seek(std::unique_lock<Mutex> &lock, offset_type new_offset)
{
assert(IsReady());
if (tail > 0 && new_offset <= (offset_type)tail) {
if (tail > 0 && std::cmp_less_equal(new_offset, tail)) {
/* buffered seek */
assert(!ReadingFromBuffer() ||