From 499a81914597f156fe9a67e47e3baf82a0af4bde Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 3 Sep 2018 15:38:51 +0200 Subject: Fix #241 segfault on 32-bit related to bad protype (#242) This should close #241 --- src/sp_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp_utils.c') diff --git a/src/sp_utils.c b/src/sp_utils.c index 970f314..8a3874c 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -287,7 +287,7 @@ bool sp_match_array_key(const zval* zv, const zend_string* to_match, } } else { char* idx_str = NULL; - spprintf(&idx_str, 0, "%lu", idx); + spprintf(&idx_str, 0, ZEND_ULONG_FMT, idx); zend_string* tmp = zend_string_init(idx_str, strlen(idx_str), 0); if (sp_match_value(tmp, to_match, rx)) { efree(idx_str); @@ -320,7 +320,7 @@ bool sp_match_array_value(const zval* arr, const zend_string* to_match, } int hook_function(const char* original_name, HashTable* hook_table, - void (*new_function)(INTERNAL_FUNCTION_PARAMETERS)) { + zif_handler new_function) { zend_internal_function* func; bool ret = FAILURE; @@ -363,7 +363,7 @@ int hook_function(const char* original_name, HashTable* hook_table, } int hook_regexp(const sp_pcre* regexp, HashTable* hook_table, - void (*new_function)(INTERNAL_FUNCTION_PARAMETERS)) { + zif_handler new_function) { zend_string* key; ZEND_HASH_FOREACH_STR_KEY(CG(function_table), key) -- cgit v1.3