[Openmp-commits] [PATCH] D60471: Fixed possible out of bound array access
Phabricator via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Apr 11 08:02:44 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL358181: Fixed possible out of bound array access. (authored by achurbanov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D60471?vs=194359&id=194694#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60471/new/
https://reviews.llvm.org/D60471
Files:
openmp/trunk/runtime/src/kmp_settings.cpp
Index: openmp/trunk/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_settings.cpp
+++ openmp/trunk/runtime/src/kmp_settings.cpp
@@ -4462,10 +4462,10 @@
pos = input;
components[level++] = pos;
while ((pos = strchr(pos, ','))) {
+ if (level >= MAX_T_LEVEL)
+ goto err; // too many components provided
*pos = '\0'; // modify input and avoid more copying
components[level++] = ++pos; // expect something after ","
- if (level > MAX_T_LEVEL)
- goto err; // too many components provided
}
// Check each component
for (int i = 0; i < level; ++i) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60471.194694.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190411/1adf78af/attachment.bin>
More information about the Openmp-commits
mailing list