Skip to content

Commit fc4875c

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mca/preg/native/preg_native.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
2+
* Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
33
* Copyright (c) 2016-2019 IBM Corporation. All rights reserved.
44
* Copyright (c) 2018 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
@@ -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)