summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_encryption.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2008-05-05 04:08:26 +0200
committerJay Berkenbilt <ejb@ql.org>2008-05-05 04:08:26 +0200
commitbbdf4f421964beee05eec50a0768be9bc349e67f (patch)
tree4664b98d27c435d6f39619dbab6dfb23814d1556 /libqpdf/QPDF_encryption.cc
parent470bb5b8bee822f09fb0457dd81f1036223b1fe7 (diff)
downloadqpdf-bbdf4f421964beee05eec50a0768be9bc349e67f.tar.zst
64-bit fix
git-svn-id: svn+q:///qpdf/trunk@610 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDF_encryption.cc')
-rw-r--r--libqpdf/QPDF_encryption.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index 7edeca29..d1faefef 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -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);