Commit a7b0aec2cf2222e00b5c748bb6b9da308b5ba1b5
1 parent
28278e27
Fix false compiler warning in debug mode
Showing
1 changed file
with
2 additions
and
2 deletions
libqpdf/QPDF_encryption.cc
| ... | ... | @@ -664,7 +664,7 @@ compute_U_UE_value_V5(std::string const& user_password, |
| 664 | 664 | // Algorithm 3.8 from the PDF 1.7 extension level 3 |
| 665 | 665 | char k[16]; |
| 666 | 666 | QUtil::initializeWithRandomBytes( |
| 667 | - QUtil::unsigned_char_pointer(k), sizeof(k)); | |
| 667 | + reinterpret_cast<unsigned char*>(k), sizeof(k)); | |
| 668 | 668 | std::string validation_salt(k, 8); |
| 669 | 669 | std::string key_salt(k + 8, 8); |
| 670 | 670 | U = hash_V5(user_password, validation_salt, "", data) + |
| ... | ... | @@ -683,7 +683,7 @@ compute_O_OE_value_V5(std::string const& owner_password, |
| 683 | 683 | // Algorithm 3.9 from the PDF 1.7 extension level 3 |
| 684 | 684 | char k[16]; |
| 685 | 685 | QUtil::initializeWithRandomBytes( |
| 686 | - QUtil::unsigned_char_pointer(k), sizeof(k)); | |
| 686 | + reinterpret_cast<unsigned char*>(k), sizeof(k)); | |
| 687 | 687 | std::string validation_salt(k, 8); |
| 688 | 688 | std::string key_salt(k + 8, 8); |
| 689 | 689 | O = hash_V5(owner_password, validation_salt, U, data) + | ... | ... |