Skip to content

Commit 5acaf00

Browse files
perrynzhouggouaillardet
authored andcommitted
regx/base: fix an integer overflow
use strtol() instead of atoi() in order to handle hostnames containing a large number. This is a one-off commit for the release branches since the regx framework has already been removed from master. Refs. #6729 Signed-off-by: perrynzhou <[email protected]>
1 parent 18f1037 commit 5acaf00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

orte/mca/regx/base/regx_base_default_fns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
3-
* Copyright (c) 2018 Research Organization for Information Science
3+
* Copyright (c) 2018-2019 Research Organization for Information Science
44
* and Technology (RIST). All rights reserved.
55
* $COPYRIGHT$
66
*
@@ -1056,7 +1056,7 @@ static int regex_parse_node_range(char *base, char *range, int num_digits, char
10561056
for (found = false, i = 0; i < len; ++i) {
10571057
if (isdigit((int) range[i])) {
10581058
if (!found) {
1059-
start = atoi(range + i);
1059+
start = strtol(range + i, NULL, 10);
10601060
found = true;
10611061
break;
10621062
}

0 commit comments

Comments
 (0)