From b005df282da43a2ba17b38e7da06a69353ea2845 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 14 Jun 2024 19:26:31 +0200 Subject: Fix a portability issue This should fix the following compilation issue: ``` /wrkdirs/usr/ports/security/snuffleupagus/work-php83/snuffleupagus-0.10.0/src/sp_utils.c:438:37: error: too few arguments provided to function-like macro invocation 438 | memcpy(mb_name, ZEND_STRL("mb_")); | ^ /usr/include/ssp/string.h:117:9: note: macro 'memcpy' defined here 117 | #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len) ``` --- src/sp_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sp_utils.c b/src/sp_utils.c index 82714c5..64de467 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -435,8 +435,8 @@ bool hook_function(const char* original_name, HashTable* hook_table, zif_handler if (NULL == mb_name) { return FAILURE; } - memcpy(mb_name, ZEND_STRL("mb_")); - memcpy(mb_name + 3, VAR_AND_LEN(original_name)); + memcpy(mb_name, "mb_", 3); + memcpy(mb_name + 3, original_name, strlen(original_name)); _hook_function(mb_name, hook_table, new_function); efree(mb_name); // LCOV_EXCL_STOP -- cgit v1.3