diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_unserialize.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index 64cf1b5..e57ef9c 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c | |||
| @@ -90,14 +90,15 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 90 | char *serialized_str = NULL; | 90 | char *serialized_str = NULL; |
| 91 | char *hmac = NULL; | 91 | char *hmac = NULL; |
| 92 | size_t buf_len = 0; | 92 | size_t buf_len = 0; |
| 93 | zval *opts = NULL; | 93 | HashTable *opts = NULL; |
| 94 | 94 | ||
| 95 | const sp_config_unserialize *config_unserialize = &(SPCFG(unserialize)); | 95 | const sp_config_unserialize *config_unserialize = &(SPCFG(unserialize)); |
| 96 | 96 | ||
| 97 | if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|a", &buf, &buf_len, &opts) == | 97 | ZEND_PARSE_PARAMETERS_START(1, 2) |
| 98 | FAILURE) { | 98 | Z_PARAM_STRING(buf, buf_len) |
| 99 | RETURN_FALSE; | 99 | Z_PARAM_OPTIONAL |
| 100 | } | 100 | Z_PARAM_ARRAY_HT(opts) |
| 101 | ZEND_PARSE_PARAMETERS_END(); | ||
| 101 | 102 | ||
| 102 | /* 64 is the length of HMAC-256 */ | 103 | /* 64 is the length of HMAC-256 */ |
| 103 | if (buf_len < 64) { | 104 | if (buf_len < 64) { |
