[php-src] Issue #21336: undefined behavior in snmp
[email protected] (chongwick)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/21336 Author: chongwick ### Description The following code: ```php <?php $v_4373 = False; $v_4374 = snmp_set_quick_print($v_4373,); $v_4375 = SNMP_VALUE_PLAIN; $v_4376 = snmp_set_valueretrieval($v_4375,); $v_4378 = $hostname; $v_4379 = $user_noauth; $v_4380 = $timeout; $v_4381 = $retries; $v_4377 = SNMP::VERSION_3; $v_4382 = new SNMP($v_4377,$v_4378,$v_4374,$v_4380,$v_4381,); $v_4422 = 'authPriv'; $v_4384 = $v_4382->setSecurity($v_4422,); ``` Resulted in this output: ``` /home/w023dtc/nightly_php/php-src/ext/snmp/snmp.c:1011:6: runtime error: member access within null pointer of type 'zend_string' (aka 'struct _zend_string') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/ext/snmp/snmp.c:1011:6 ``` ### PHP Version ```plain nightly ``` ### Operating System _No response_