diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-03-19 22:24:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-04-19 23:16:02 +0200 |
commit | 55d380144a7a2cb7afb880ce3fc9c481eb5efde2 (patch) | |
tree | 6862a794e8977839fe0c32a8b507011a5ab14a65 /src/partition | |
parent | d17db7b2bf716dbf6c20691755b4710a8068e284 (diff) | |
download | systemd-55d380144a7a2cb7afb880ce3fc9c481eb5efde2.tar.gz |
repart: add one more overflow check
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 1ee5eaa25e..ac6e4e7f86 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -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; |