From 4ae93a73c5bbf36cf2b36712b0df7acabbc1e61a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 31 Jan 2021 07:13:04 -0500 Subject: Improve memory safety of dict/array iterators --- include/qpdf/QPDFObjectHandle.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 3f1e7d3a..4c986af7 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1242,7 +1242,7 @@ class QPDFDictItems public: QPDF_DLL - QPDFDictItems(QPDFObjectHandle& oh); + QPDFDictItems(QPDFObjectHandle const& oh); class iterator: public std::iterator< std::bidirectional_iterator_tag, @@ -1314,7 +1314,7 @@ class QPDFDictItems iterator end(); private: - QPDFObjectHandle& oh; + QPDFObjectHandle oh; }; class QPDFArrayItems @@ -1332,7 +1332,7 @@ class QPDFArrayItems public: QPDF_DLL - QPDFArrayItems(QPDFObjectHandle& oh); + QPDFArrayItems(QPDFObjectHandle const& oh); class iterator: public std::iterator< std::bidirectional_iterator_tag, @@ -1403,7 +1403,7 @@ class QPDFArrayItems iterator end(); private: - QPDFObjectHandle& oh; + QPDFObjectHandle oh; }; -- cgit v1.2.3-54-g00ecf