summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sp_unserialize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c
index 3e810fc..b7c5e1b 100644
--- a/src/sp_unserialize.c
+++ b/src/sp_unserialize.c
@@ -137,7 +137,7 @@ PHP_FUNCTION(sp_unserialize) {
137 char* serialized_str = ecalloc(buf_len - 64 + 1, 1); 137 char* serialized_str = ecalloc(buf_len - 64 + 1, 1);
138 memcpy(serialized_str, buf, buf_len - 64); 138 memcpy(serialized_str, buf, buf_len - 64);
139 139
140 zend_string *expected_hmac = sp_do_hash_hmac_sha256(serialized_str, strlen(serialized_str), ZSTR_VAL(SPCFG(encryption_key)), ZSTR_LEN(SPCFG(encryption_key))); 140 zend_string *expected_hmac = sp_do_hash_hmac_sha256(serialized_str, buf_len - 64, ZSTR_VAL(SPCFG(encryption_key)), ZSTR_LEN(SPCFG(encryption_key)));
141 141
142 unsigned int status = 0; 142 unsigned int status = 0;
143 if (expected_hmac) { 143 if (expected_hmac) {