From a184c2b555eb1882657513cbe5341be72579db74 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 11 Jan 2024 12:19:24 +0100 Subject: [PATCH] lib/idmapping.c: get_map_ranges(): Remove dead code This test is impossible. The limits specified in a2ul() already cover this. Link: Cc: Serge Hallyn Signed-off-by: Alejandro Colomar --- lib/idmapping.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/idmapping.c b/lib/idmapping.c index 3f55d8c8..b9107647 100644 --- a/lib/idmapping.c +++ b/lib/idmapping.c @@ -80,11 +80,6 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv) free(mappings); return NULL; } - if (m->lower + m->count < m->lower || m->upper + m->count < m->upper) { - /* this one really shouldn't be possible given previous checks */ - fprintf(log_get_logfd(), _( "%s: subuid overflow detected.\n"), log_get_progname()); - exit(EXIT_FAILURE); - } } return mappings; }