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

snmpv3.c: Confirm snmpv3_generate_engineID() was successful #634

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

moshekaplan
Copy link
Contributor

@moshekaplan moshekaplan commented Aug 25, 2023

Confirm snmpv3_generate_engineID() was successful before using data from it

If snmpv3_generate_engineID() fails, it returns NULL, possibly without modifying the passed-in engineIDLen parameter. This change examines the return value from snmpv3_generate_engineID() before examining the possibly-uninitialized engineIDLen.

Found with clang scan-build

…ing data from it

If snmpv3_generate_engineID() fails, it returns NULL, possibly without modifying the passed-in engineIDLen parameter. This change examines the return value from snmpv3_generate_engineID() before examining the possibly-uninitialized engineIDLen.
@bvanassche bvanassche merged commit 7f35bb9 into net-snmp:master Aug 25, 2023
5 checks passed
@bvanassche
Copy link
Contributor

Thanks for the patch!

@moshekaplan moshekaplan deleted the moshekaplan-patch-24 branch October 2, 2023 03:38
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.

None yet

2 participants