diff options
Diffstat (limited to 'src/sp_unserialize.c')
| -rw-r--r-- | src/sp_unserialize.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index 29706c9..8977dd9 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c | |||
| @@ -61,8 +61,7 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 61 | 61 | ||
| 62 | /* 64 is the length of HMAC-256 */ | 62 | /* 64 is the length of HMAC-256 */ |
| 63 | if (buf_len < 64) { | 63 | if (buf_len < 64) { |
| 64 | sp_log_msg("unserialize", SP_LOG_DROP, | 64 | sp_log_drop("unserialize", "The serialized object is too small."); |
| 65 | "The serialized object is too small."); | ||
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | hmac = buf + buf_len - 64; | 67 | hmac = buf + buf_len - 64; |
| @@ -99,16 +98,14 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 99 | SP_TOKEN_UNSERIALIZE_HMAC); | 98 | SP_TOKEN_UNSERIALIZE_HMAC); |
| 100 | } | 99 | } |
| 101 | if (true == config_unserialize->simulation) { | 100 | if (true == config_unserialize->simulation) { |
| 102 | sp_log_msg("unserialize", SP_LOG_SIMULATION, "Invalid HMAC for %s", | 101 | sp_log_simulation("unserialize", "Invalid HMAC for %s", serialized_str); |
| 103 | serialized_str); | ||
| 104 | if ((orig_handler = zend_hash_str_find_ptr( | 102 | if ((orig_handler = zend_hash_str_find_ptr( |
| 105 | SNUFFLEUPAGUS_G(sp_internal_functions_hook), "unserialize", | 103 | SNUFFLEUPAGUS_G(sp_internal_functions_hook), "unserialize", |
| 106 | sizeof("unserialize") - 1))) { | 104 | sizeof("unserialize") - 1))) { |
| 107 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 105 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 108 | } | 106 | } |
| 109 | } else { | 107 | } else { |
| 110 | sp_log_msg("unserialize", SP_LOG_DROP, "Invalid HMAC for %s", | 108 | sp_log_drop("unserialize", "Invalid HMAC for %s", serialized_str); |
| 111 | serialized_str); | ||
| 112 | } | 109 | } |
| 113 | } | 110 | } |
| 114 | efree(serialized_str); | 111 | efree(serialized_str); |
