[Openmp-commits] [openmp] r238215 - One line fix for possible out-of-bounds issue in kmp_error.c
Jonathan Peyton
jonathan.l.peyton at intel.com
Tue May 26 09:30:42 PDT 2015
Author: jlpeyton
Date: Tue May 26 11:30:41 2015
New Revision: 238215
URL: http://llvm.org/viewvc/llvm-project?rev=238215&view=rev
Log:
One line fix for possible out-of-bounds issue in kmp_error.c
This off-by-one error could lead to an out-of-bounds access on the
cons_text_c[] array.
Modified:
openmp/trunk/runtime/src/kmp_error.c
Modified: openmp/trunk/runtime/src/kmp_error.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_error.c?rev=238215&r1=238214&r2=238215&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_error.c (original)
+++ openmp/trunk/runtime/src/kmp_error.c Tue May 26 11:30:41 2015
@@ -1,4 +1,4 @@
-/*
+/*
* kmp_error.c -- KPTS functions for error checking at runtime
*/
@@ -121,7 +121,7 @@ __kmp_pragma(
kmp_str_buf_t buffer;
kmp_msg_t prgm;
__kmp_str_buf_init( & buffer );
- if ( 0 < ct && ct <= cons_text_c_num ) {
+ if ( 0 < ct && ct < cons_text_c_num ) {
cons = cons_text_c[ ct ];
} else {
KMP_DEBUG_ASSERT( 0 );
More information about the Openmp-commits
mailing list