From bbdf4f421964beee05eec50a0768be9bc349e67f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 5 May 2008 02:08:26 +0000 Subject: 64-bit fix git-svn-id: svn+q:///qpdf/trunk@610 71b93d88-0707-0410-a8cf-f5a4172ac649 --- libqpdf/QPDF_encryption.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-54-g00ecf