mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-30 18:38:52 +00:00
64-bit fix
git-svn-id: svn+q:///qpdf/trunk@610 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
470bb5b8be
commit
bbdf4f4219
@ -26,7 +26,7 @@ static unsigned int const key_bytes = 32;
|
||||
void
|
||||
pad_or_truncate_password(std::string const& password, char k1[key_bytes])
|
||||
{
|
||||
int password_bytes = std::min(key_bytes, password.length());
|
||||
int password_bytes = std::min((size_t) key_bytes, password.length());
|
||||
int pad_bytes = key_bytes - password_bytes;
|
||||
memcpy(k1, password.c_str(), password_bytes);
|
||||
memcpy(k1 + password_bytes, padding_string, pad_bytes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user