Skip to content

member access within null pointer in conversions.c #21161

@chongwick

Description

@chongwick

Description

The following code:

<?php
$v_17771 = AF_INET6;
$v_17772 = SOCK_DGRAM;
$v_17773 = SOL_UDP;
$v_17774 = socket_create($v_17771,$v_17772,$v_17773,);
$v_17775 = 'err';
($v_17775);
$v_17777 = IPPROTO_IPV6;
$v_17782 = IPPROTO_IPV6;
$v_17779 = array();
$v_17780 = socket_set_option($v_17774,$v_17777,$v_17782,$v_17779,);
$v_17783 = IPV6_PKTINFO;
$v_17788 = 0;
$v_17784 = array('addr' => $v_17784,'ifindex' => $v_17788,);
$v_17789 = socket_set_option($v_17774,$v_17782,$v_17783,$v_17784,);

Resulted in this output:

/home/w023dtc/nightly_php/php-src/ext/sockets/conversions.c:614:16: 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/sockets/conversions.c:614:16

PHP Version

nightly

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions