From a8a0a6c3f12caa12f3c7ae16388bcaaa3393e832 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 8 Aug 2011 08:49:55 +0000 Subject: [PATCH] Sizeof mismatch --- ext/spl/spl_observer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 2bbd029579..2487a08a3c 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -117,7 +117,7 @@ static char *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *thi if (rv) { if (Z_TYPE_P(rv) == IS_STRING) { int hash_len = Z_STRLEN_P(rv); - char *hash = emalloc((hash_len+1)*sizeof(char *)); + char *hash = emalloc((hash_len+1)*sizeof(char)); strncpy(hash, Z_STRVAL_P(rv), hash_len); hash[hash_len] = 0; -- 2.40.0