summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfencrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfencrypt.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfencrypt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfencrypt.c b/Build/source/texk/dvipdfm-x/pdfencrypt.c
index f34e41c0fc8..7a7f7bff63c 100644
--- a/Build/source/texk/dvipdfm-x/pdfencrypt.c
+++ b/Build/source/texk/dvipdfm-x/pdfencrypt.c
@@ -173,16 +173,16 @@ compute_owner_password (struct pdf_sec *p,
ARC4(&arc4, 32, padded, tmp1);
if (p->R >= 3) {
- for (i = 1; i <= 19; i++) {
+ for (i = 1; i <= 19; i++) {
memcpy(tmp2, tmp1, 32);
for (j = 0; j < p->key_size; j++)
key[j] = hash[j] ^ i;
ARC4_set_key(&arc4, p->key_size, key);
ARC4(&arc4, 32, tmp2, tmp1);
+ }
}
- }
+ memcpy(p->O, tmp1, 32);
}
- memcpy(p->O, hash, 32);
}
static void