diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-06 19:53:16 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-07 23:38:22 +0100 |
commit | 40f1946df8acb0bb7fefdc3ab31f6285bb11d032 (patch) | |
tree | 87776a2a5f628bca1f4a1a0f46c4544aac7749e2 /libqpdf/QPDF_encryption.cc | |
parent | dd4f30226f3d4738e198dfcb944ce4cdc7e50a86 (diff) | |
download | qpdf-40f1946df8acb0bb7fefdc3ab31f6285bb11d032.tar.zst |
Replace PointerHolder arrays with shared_ptr arrays where possible
Replace PointerHolder arrays wherever it can be done without breaking ABI.
Diffstat (limited to 'libqpdf/QPDF_encryption.cc')
-rw-r--r-- | libqpdf/QPDF_encryption.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc index 5ce63e4c..83768414 100644 --- a/libqpdf/QPDF_encryption.cc +++ b/libqpdf/QPDF_encryption.cc @@ -204,8 +204,7 @@ iterate_rc4(unsigned char* data, size_t data_len, unsigned char* okey, int key_len, int iterations, bool reverse) { - PointerHolder<unsigned char> key_ph = PointerHolder<unsigned char>( - true, new unsigned char[QIntC::to_size(key_len)]); + auto key_ph = std::make_unique<unsigned char[]>(QIntC::to_size(key_len)); unsigned char* key = key_ph.get(); for (int i = 0; i < iterations; ++i) { |