Skip to content

Commit 5c9fedc

Browse files
committed
ext/random: Use zend_string macro instead of accessing value directly
1 parent 459eb54 commit 5c9fedc

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
@@ -357,7 +357,7 @@ PHPAPI zend_string *php_random_bin2hex_le(const void *ptr, const size_t len)
357357
PHPAPI bool php_random_hex2bin_le(const zend_string *hexstr, void *dest)
358358
{
359359
size_t len = hexstr->len >> 1;
360-
const unsigned char *str = (unsigned char *) hexstr->val;
360+
const unsigned char *str = (unsigned char *) ZSTR_VAL(hexstr);
361361
unsigned char c, l, d;
362362
unsigned char *ptr = (unsigned char *) dest;
363363
uint32_t is_letter, i = 0;

0 commit comments

Comments
 (0)