From 6a4117add996eeaaf330bd700e30380295daab93 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 3 Apr 2020 17:14:11 -0400 Subject: Avoid potential segfault in warning methods --- libqpdf/QPDFObjectHandle.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libqpdf') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 4c19b377..dca59216 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -2652,6 +2652,7 @@ QPDFObjectHandle::typeWarning(char const* expected_type, { QPDF* context = 0; std::string description; + dereference(); if (this->obj->getDescription(context, description)) { warn(context, @@ -2674,6 +2675,7 @@ QPDFObjectHandle::warnIfPossible(std::string const& warning, { QPDF* context = 0; std::string description; + dereference(); if (this->obj->getDescription(context, description)) { warn(context, -- cgit v1.2.3-54-g00ecf