Skip to content

Fix GH-25858: snmp_init_mib() crashes when $mibdirs is omitted or null - #25861

Open
lazerg wants to merge 1 commit into
php:PHP-8.6from
lazerg:fix/gh-25858-snmp-init-mib-null
Open

lazerg wants to merge 1 commit into
php:PHP-8.6from
lazerg:fix/gh-25858-snmp-init-mib-null

Conversation

@lazerg

@lazerg lazerg commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

snmp_init_mib() passed ZSTR_VAL(mibdirs) to netsnmp_ds_set_string() even when $mibdirs was null, so calling it without an argument or with null crashed. It now passes NULL in that case, which makes net-snmp fall back to its default MIB directories, as the RFC describes and as RSHUTDOWN already does. The stub also lacked the = null default even though ZPP treats the argument as optional, so debug builds hit an arginfo/zpp mismatch on snmp_init_mib().

Fixes #25858

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.

2 participants