Skip to content

Commit a4b0641

Browse files
committed
Fix potential integer overflow in regex
Backport of open-mpi/ompi#6739 Signed-off-by: Ralph Castain <[email protected]> (cherry picked from commit fc4875c)
1 parent fd38904 commit a4b0641

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mca/preg/native/preg_native.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ static pmix_status_t regex_parse_value_range(char *base, char *range,
893893
for (found = false, i = 0; i < len; ++i) {
894894
if (isdigit((int) range[i])) {
895895
if (!found) {
896-
start = atoi(range + i);
896+
start = strtol(range + i, NULL, 10);
897897
found = true;
898898
break;
899899
}

0 commit comments

Comments
 (0)