summaryrefslogtreecommitdiffstats
path: root/libtests/aes.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-06-20 17:20:57 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-20 21:20:26 +0200
commit5d4cad9c02e9d4f31477fed0e3b20b35c83936f8 (patch)
tree38768f5e4a797e09de304b1e184021f5b280da29 /libtests/aes.cc
parent24e2b2b76f1f0051f240c8371b2352c4cde85bf9 (diff)
downloadqpdf-5d4cad9c02e9d4f31477fed0e3b20b35c83936f8.tar.zst
ABI change: fix use of off_t, size_t, and integer types
Significantly improve the code's use of off_t for file offsets, size_t for memory sizes, and integer types in cases where there has to be compatibility with external interfaces. Rework sections of the code that would have prevented qpdf from working on files larger than 2 (or maybe 4) GB in size.
Diffstat (limited to 'libtests/aes.cc')
-rw-r--r--libtests/aes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtests/aes.cc b/libtests/aes.cc
index 418c3297..ad2f0dd8 100644
--- a/libtests/aes.cc
+++ b/libtests/aes.cc
@@ -46,7 +46,7 @@ int main(int argc, char* argv[])
usage();
}
- unsigned int hexkeylen = strlen(hexkey);
+ unsigned int hexkeylen = (unsigned int)strlen(hexkey);
unsigned int keylen = hexkeylen / 2;
if (keylen != Pl_AES_PDF::key_size)
{
@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
bool done = false;
while (! done)
{
- int len = fread(buf, 1, sizeof(buf), infile);
+ size_t len = fread(buf, 1, sizeof(buf), infile);
if (len <= 0)
{
done = true;