Skip to content

Commit 630af10

Browse files
authored
Merge pull request #6739 from ggouaillardet/topic/regx_atoi
v4.0.x: regx/base: fix an integer overflow
2 parents 105bfed + 5acaf00 commit 630af10

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)