]> granicus.if.org Git - php/commitdiff
Unbreak crypt() (fix bug #55439)
authorStanislav Malyshev <stas@php.net>
Fri, 19 Aug 2011 22:49:18 +0000 (22:49 +0000)
committerStanislav Malyshev <stas@php.net>
Fri, 19 Aug 2011 22:49:18 +0000 (22:49 +0000)
# If you want to remove static analyser messages, be my guest,
# but please run unit tests after

ext/standard/php_crypt_r.c

index f4516712dae0679058040e227d866351b798387b..e8b482ab6b7d8b100406e5be55830398cda22480 100644 (file)
@@ -377,7 +377,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
        /* Now make the output string */
        memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN);
        strlcpy(passwd + MD5_MAGIC_LEN, sp, sl + 1);
-       strlcat(passwd, "$", 1);
+       strcat(passwd, "$");
 
        PHP_MD5Final(final, &ctx);