Skip to content

Respect MAX_JSON_KEY size#618

Draft
Martin-Zeithaml wants to merge 3 commits into
v3.x/stagingfrom
v3.x/bugfix/deleteJson
Draft

Respect MAX_JSON_KEY size#618
Martin-Zeithaml wants to merge 3 commits into
v3.x/stagingfrom
v3.x/bugfix/deleteJson

Conversation

@Martin-Zeithaml

@Martin-Zeithaml Martin-Zeithaml commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Internally we have a limit MAX_JSON_KEY is 256.

When deleting from JSON, working buffer is expecting MAX_JSON_KEY length, but this is not properly checked.

Does not work & more issues found :-(

zowe:
  environment:
    deleteeeeeeeeeeeeeeeeeeeeeeee.....eeee: "a"
    doNotDeleteKey: "qwer"

Seems the key is deleted for zowe.environments.deleteeeeeeeeeeeeeeeeeeeeeeee.....eeee or deleteeeeeeeeeeeeeeeeeeeeeeee.....eeee!

Signed-off-by: Martin Zeithaml <Martin.Zeithaml@broadcom.com>
Signed-off-by: Martin Zeithaml <Martin.Zeithaml@broadcom.com>
Comment thread c/json.c
if (n < 0 || (size_t)n >= sizeof(workStr)) {
break;
}
while (workStr[0] != '\0' && workStr[strlen(workStr)-1] != ']') {
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants