2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Avoid potential segfault in warning methods

This commit is contained in:
Jay Berkenbilt 2020-04-03 17:14:11 -04:00
parent 4f3b89991b
commit 6a4117add9

View File

@ -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,