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

ext/snmp: Add null check for uninitialized SNMP session in security level setter #17332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evrenonur
Copy link

This change introduces a validation step in the netsnmp_session_set_sec_level function to ensure that the SNMP session is properly initialized before attempting to set the security level. If the session is not initialized, a zend_value_error is triggered, improving error handling and preventing potential crashes.

Fixes: #17330

…evel setter

This change introduces a validation step in the `netsnmp_session_set_sec_level` function to ensure that the SNMP session is properly initialized before attempting to set the security level. If the session is not initialized, a zend_value_error is triggered, improving error handling and preventing potential crashes.
@devnexen
Copy link
Member

devnexen commented Jan 3, 2025

Thanks but I had a slightly different approach in mind, will commit soon-ish :)

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.

snmp SEGV
2 participants