Skip to content

Commit 14ecf5d

Browse files
authored
Merge pull request #11828 from ggouaillardet/topic/opal_params_core
opal_var_dump_color_keys: fix an array overflow
2 parents ec62190 + 7b325e3 commit 14ecf5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

opal/runtime/opal_params_core.c

+5-4
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.
@@ -92,10 +92,11 @@ static bool opal_register_util_done = false;
9292

9393
static char *opal_var_dump_color_string = NULL;
9494

95-
static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = {
95+
static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT+1] = {
9696
[OPAL_VAR_DUMP_COLOR_VAR_NAME] = "name",
9797
[OPAL_VAR_DUMP_COLOR_VAR_VALUE] = "value",
98-
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values"
98+
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values",
99+
[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = NULL
99100
};
100101

101102
/**

0 commit comments

Comments
 (0)