mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
repart: add one more overflow check
This commit is contained in:
@@ -2227,6 +2227,9 @@ static int context_discard_range(
|
||||
|
||||
range[0] = round_up_size(offset, 512);
|
||||
|
||||
if (offset > UINT64_MAX - size)
|
||||
return -ERANGE;
|
||||
|
||||
end = offset + size;
|
||||
if (end <= range[0])
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user