Skip to content

Commit 5325a7c

Browse files
authored
Merge pull request #12030 from jsquyres/pr/v5.0.x/fix-opal-params-core
v5.0.x: opal_var_dump_color_keys: fix an array overflow
2 parents 1e9b325 + 220d467 commit 5325a7c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

opal/runtime/opal_params_core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* Copyright (c) 2010-2014 Los Alamos National Security, LLC.
1818
* All rights reserved.
1919
* Copyright (c) 2014 Hochschule Esslingen. All rights reserved.
20-
* Copyright (c) 2015 Research Organization for Information Science
21-
* and Technology (RIST). All rights reserved.
20+
* Copyright (c) 2015-2023 Research Organization for Information Science
21+
* and Technology (RIST). All rights reserved.
2222
* Copyright (c) 2015 Mellanox Technologies, Inc.
2323
* All rights reserved.
2424
* Copyright (c) 2017 IBM Corporation. All rights reserved.
@@ -89,10 +89,11 @@ static bool opal_register_util_done = false;
8989

9090
static char *opal_var_dump_color_string = NULL;
9191

92-
static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = {
92+
static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT+1] = {
9393
[OPAL_VAR_DUMP_COLOR_VAR_NAME] = "name",
9494
[OPAL_VAR_DUMP_COLOR_VAR_VALUE] = "value",
95-
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values"
95+
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values",
96+
[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = NULL
9697
};
9798

9899
/**

0 commit comments

Comments
 (0)