[php-src] PR #25861: Fix GH-25858: snmp_init_mib() crashes when $mibdirs is omitted or null
| From: | lazerg | Date: | Sat, 28 Nov 2026 01:58:17 +0000 |
| Subject: | [php-src] PR #25861: Fix GH-25858: snmp_init_mib() crashes when $mibdirs is omitted or null | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41143@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25861
Author: lazerg
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