Fix missing ivlen initializer for 40-bit RC4 (Issue #51)

This commit is contained in:
Michael R Sweet 2023-11-15 08:43:07 -05:00
parent ddd984215a
commit 4804db38a5
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ v1.1.3 (Month DD, YYYY)
----------------------- -----------------------
- Fixed Unicode font support (Issue #16) - Fixed Unicode font support (Issue #16)
- Fixed missing initializer for 40-bit RC4 encryption (Issue #51)
v1.1.2 (October 10, 2023) v1.1.2 (October 10, 2023)

View File

@ -1,7 +1,7 @@
// //
// Cryptographic support functions for PDFio. // Cryptographic support functions for PDFio.
// //
// Copyright © 2021 by Michael R Sweet. // Copyright © 2021-2023 by Michael R Sweet.
// //
// Licensed under Apache License v2.0. See the file "LICENSE" for more // Licensed under Apache License v2.0. See the file "LICENSE" for more
// information. // information.
@ -446,6 +446,7 @@ _pdfio_crypto_cb_t // O - Decryption callback or `NULL` for none
// Initialize the RC4 context using 40 bits of the digest... // Initialize the RC4 context using 40 bits of the digest...
_pdfioCryptoRC4Init(&ctx->rc4, digest, 5); _pdfioCryptoRC4Init(&ctx->rc4, digest, 5);
*ivlen = 0;
return ((_pdfio_crypto_cb_t)_pdfioCryptoRC4Crypt); return ((_pdfio_crypto_cb_t)_pdfioCryptoRC4Crypt);
case PDFIO_ENCRYPTION_RC4_128 : case PDFIO_ENCRYPTION_RC4_128 :