mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00
Sizeof mismatch
This commit is contained in:
parent
8ea0c7d6e6
commit
802b871ea1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue