Skip to content

Stpctl derive command list size from array#82

Open
yamontv wants to merge 1 commit intosonic-net:masterfrom
yamontv:fix/stpctl_ud
Open

Stpctl derive command list size from array#82
yamontv wants to merge 1 commit intosonic-net:masterfrom
yamontv:fix/stpctl_ud

Conversation

@yamontv
Copy link
Contributor

@yamontv yamontv commented Jan 18, 2026

Switch command list iteration to use sizeof(g_cmd_list) instead of STP_CTL_MAX, preventing potential out-of-bounds access if the enum and list diverge.
#76

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 18, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: yamontv / name: Vyacheslav Yamont (9320bc2)

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Switch command list iteration to use sizeof(g_cmd_list) instead of
STP_CTL_MAX, preventing potential out-of-bounds access if the enum
and list diverge.

Signed-off-by: Vyacheslav Yamont <yamontv@gmail.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yamontv
Copy link
Contributor Author

yamontv commented Jan 20, 2026

@divyachandralekha , could you kindly review the change?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants