]> granicus.if.org Git - php/commitdiff
Make static analyzers happy
authorRasmus Lerdorf <rasmus@php.net>
Sun, 7 Aug 2011 15:38:36 +0000 (15:38 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sun, 7 Aug 2011 15:38:36 +0000 (15:38 +0000)
ext/standard/php_crypt_r.c

index e8b482ab6b7d8b100406e5be55830398cda22480..f169c1a745e84830287831f094773eeb923a7536 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);
-       strcat(passwd, "$");
+       strncat(passwd, "$", 1);
 
        PHP_MD5Final(final, &ctx);