Skip to content

Commit e332817

Browse files
committed
ext/random: Use zend_string macro instead of accessing value directly
1 parent 49dc129 commit e332817

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/random/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ PHPAPI zend_string *php_random_bin2hex_le(const void *ptr, const size_t len)
358358
PHPAPI bool php_random_hex2bin_le(const zend_string *hexstr, void *dest)
359359
{
360360
size_t len = hexstr->len >> 1;
361-
const unsigned char *str = (unsigned char *) hexstr->val;
361+
const unsigned char *str = (unsigned char *) ZSTR_VAL(hexstr);
362362
unsigned char c, l, d;
363363
unsigned char *ptr = (unsigned char *) dest;
364364
uint32_t is_letter, i = 0;

0 commit comments

Comments
 (0)