Skip to content

Fix GH-21336: undefined behavior in snmp setSecurity.#21337

Closed
devnexen wants to merge 3 commits intophp:PHP-8.4from
devnexen:gh21336
Closed

Fix GH-21336: undefined behavior in snmp setSecurity.#21337
devnexen wants to merge 3 commits intophp:PHP-8.4from
devnexen:gh21336

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented Mar 4, 2026

No description provided.

@devnexen devnexen marked this pull request as ready for review March 4, 2026 05:57
@devnexen devnexen linked an issue Mar 4, 2026 that may be closed by this pull request
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better, although ideally we'd have the ValueError indicate which param is required.

Comment on lines +1119 to +1122
if (!auth_protocol) {
zend_value_error("Authentication protocol is required for security level \"authNoPriv\" or \"authPriv\"");
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you provide the argnum for auth_protocol and then we can derive all the other ones?

@devnexen devnexen closed this in 41458c6 Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

undefined behavior in snmp

2 participants