Fix buffer overlow when checking hashed passwords

svn:r4308
This commit is contained in:
Nick Mathewson 2005-06-05 14:28:47 +00:00
parent 8666f07f65
commit 9f24078452

View File

@ -481,7 +481,7 @@ decode_hashed_password(char *buf, const char *hashed)
}
}
if (buf)
memcpy(buf, decoded, sizeof(decoded));
memcpy(buf, decoded, S2K_SPECIFIER_LEN+DIGEST_LEN);
return 0;
}