diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-01-31 13:13:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-01-31 13:16:03 +0100 |
commit | 4ae93a73c5bbf36cf2b36712b0df7acabbc1e61a (patch) | |
tree | 58c3193f4192f43b4c3ea190249a4a64b726bdc0 /include | |
parent | 1fec40454ef72c6e2f079b599e9c807ce69a4bec (diff) | |
download | qpdf-4ae93a73c5bbf36cf2b36712b0df7acabbc1e61a.tar.zst |
Improve memory safety of dict/array iterators
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 8 |
1 files changed, 4 insertions, 4 deletions
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; }; |