From: Alejandro Colomar Date: Thu, 11 Jan 2024 11:19:24 +0000 (+0100) Subject: lib/idmapping.c: get_map_ranges(): Remove dead code X-Git-Tag: 4.17.0-rc1~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a184c2b555eb1882657513cbe5341be72579db74;p=thirdparty%2Fshadow.git 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 --- diff --git a/lib/idmapping.c b/lib/idmapping.c index 3f55d8c8a..b91076474 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; }