input/{async,rewind}, decoder/dsdiff: use std::cmp_*() for safer integer comparisons
This commit is contained in:
@@ -387,7 +387,7 @@ dsdiff_decode_chunk(DecoderClient &client, InputStream &is,
|
||||
/* see how much aligned data from the remaining chunk
|
||||
fits into the local buffer */
|
||||
size_t now_size = buffer_size;
|
||||
if (remaining_bytes < (offset_type)now_size) {
|
||||
if (std::cmp_less(remaining_bytes, now_size)) {
|
||||
unsigned now_frames = remaining_bytes / frame_size;
|
||||
now_size = now_frames * frame_size;
|
||||
}
|
||||
|
Reference in New Issue
Block a user