aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-03 23:14:11 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-04 03:39:20 +0200
commit6a4117add996eeaaf330bd700e30380295daab93 (patch)
treef7f7f62c1466f1c55e777e2f23e0a42182fd4e29 /libqpdf
parent4f3b89991be466b77d1be2ab4fe0dc3f9228a17e (diff)
downloadqpdf-6a4117add996eeaaf330bd700e30380295daab93.tar.zst
Avoid potential segfault in warning methods
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFObjectHandle.cc2
1 files changed, 2 insertions, 0 deletions
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,