Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1786 #1787

Merged
merged 10 commits into from Jan 11, 2014
Prev Previous commit
Next Next commit
Dereference of null pointer in zim_Phalcon_Security_deriveKey()
  • Loading branch information
sjinks committed Jan 11, 2014
commit 507af9b31bccfd99c9a37798836901ae525a4898
2 changes: 1 addition & 1 deletion ext/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ PHP_METHOD(Phalcon_Security, deriveKey)

#if defined(PHALCON_USE_PHP_HASH)
{
const php_hash_ops *ops = php_hash_fetch_ops(s_hash, Z_STRLEN_PP(hash));
const php_hash_ops *ops = php_hash_fetch_ops(s_hash, hash ? (size_t)(Z_STRLEN_PP(hash)) : strlen(s_hash));
void *context;
unsigned char *K1, *K2, *digest, *temp, *result, *computed_salt;
long int i, j, loops, digest_length;
Expand Down