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. llvm-svn: 238215
This commit is contained in:
parent
9934ccbad1
commit
ff8007711a
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* kmp_error.c -- KPTS functions for error checking at runtime
|
* kmp_error.c -- KPTS functions for error checking at runtime
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ __kmp_pragma(
|
||||||
kmp_str_buf_t buffer;
|
kmp_str_buf_t buffer;
|
||||||
kmp_msg_t prgm;
|
kmp_msg_t prgm;
|
||||||
__kmp_str_buf_init( & buffer );
|
__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 ];
|
cons = cons_text_c[ ct ];
|
||||||
} else {
|
} else {
|
||||||
KMP_DEBUG_ASSERT( 0 );
|
KMP_DEBUG_ASSERT( 0 );
|
||||||
|
|
Loading…
Reference in New Issue