]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 21:08:02 +0000 (21:08 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 21:08:02 +0000 (21:08 +0000)
ext/mhash/mhash.c

index 23302fdc9a75334e3a54b0ada67180377e6280ee..2e201a7287d098c8d4a20a814735f30a522b1b13 100644 (file)
@@ -229,7 +229,7 @@ PHP_FUNCTION(mhash_keygen_s2k)
        keystruct.salt = salt;
        keystruct.salt_size = salt_len;
 
-       ret = emalloc(bytes + 1);
+       ret = safe_emalloc(1, bytes, 1);
 
        if (mhash_keygen_ext(KEYGEN_S2K_SALTED, keystruct, ret, bytes, password, password_len) >= 0) {
                ret[bytes] = '\0';