Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.x: opal_var_dump_color_keys: fix an array overflow #12030

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions opal/runtime/opal_params_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Copyright (c) 2010-2014 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Hochschule Esslingen. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015-2023 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
Expand Down Expand Up @@ -89,10 +89,11 @@ static bool opal_register_util_done = false;

static char *opal_var_dump_color_string = NULL;

static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = {
static char *opal_var_dump_color_keys[OPAL_VAR_DUMP_COLOR_KEY_COUNT+1] = {
[OPAL_VAR_DUMP_COLOR_VAR_NAME] = "name",
[OPAL_VAR_DUMP_COLOR_VAR_VALUE] = "value",
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values"
[OPAL_VAR_DUMP_COLOR_VALID_VALUES] = "valid_values",
[OPAL_VAR_DUMP_COLOR_KEY_COUNT] = NULL
};

/**
Expand Down