From 40f1946df8acb0bb7fefdc3ab31f6285bb11d032 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 6 Feb 2022 13:53:16 -0500 Subject: Replace PointerHolder arrays with shared_ptr arrays where possible Replace PointerHolder arrays wherever it can be done without breaking ABI. --- libqpdf/QPDF_encryption.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libqpdf/QPDF_encryption.cc') 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 key_ph = PointerHolder( - true, new unsigned char[QIntC::to_size(key_len)]); + auto key_ph = std::make_unique(QIntC::to_size(key_len)); unsigned char* key = key_ph.get(); for (int i = 0; i < iterations; ++i) { -- cgit v1.2.3-54-g00ecf