Skip to content

Commit

Permalink
Merge pull request #12030 from jsquyres/pr/v5.0.x/fix-opal-params-core
Browse files Browse the repository at this point in the history
v5.0.x: opal_var_dump_color_keys: fix an array overflow
  • Loading branch information
janjust authored Nov 9, 2023
2 parents 1e9b325 + 220d467 commit 5325a7c
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 5325a7c

Please sign in to comment.