Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu
Dear Release team, This update fixes bug #919504 that is also known as #929286, #931860, #933278 and #945147. The debdiff is attached. Please see the header of the added patch for the description of the fix. -- Dmitry Shachnev
--- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +qtwebengine-opensource-src (5.11.3+dfsg-2+deb10u1) buster; urgency=medium + + * Fix PDF parsing by adding the missing non-const overrides for + CPDF_Dictionary::GetDict() and CPDF_Reference::GetDict(). This also + fixes QWebEnginePage::print() method (closes: #919504). + + -- Dmitry Shachnev <mity...@debian.org> Fri, 29 Nov 2019 23:04:08 +0300 + qtwebengine-opensource-src (5.11.3+dfsg-2) unstable; urgency=medium [ Dmitry Shachnev ] --- /dev/null +++ b/debian/patches/getdict-overrides.patch @@ -0,0 +1,80 @@ +Description: fix GetDict methods in CPDF_Object descendants + In commit [1], Qt WebEngine developers backported a change to cpdf_object.h + that splits GetDict() virtual method into two: const and non-const. + . + However, this change was not applied to CPDF_Dictionary and CPDF_Reference + that are descendant classes of CPDF_Object. So they were missing the non-const + override, and the method from base class CPDF_Object was used instead (which + always returns nullptr). + . + In upstream PDFium, all files were changed in [2], so the bug was specific to + Qt WebEngine 5.11 (Chromium 65-based) branch. + . + [1]: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=bc188914f3ce1d2c + [2]: https://pdfium.googlesource.com/pdfium/+/7e28208d26764438 +Author: Dmitry Shachnev <mity...@debian.org> +Last-Update: 2019-11-29 + +--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_dictionary.cpp ++++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_dictionary.cpp +@@ -42,10 +42,12 @@ CPDF_Object::Type CPDF_Dictionary::GetTy + return DICTIONARY; + } + +-CPDF_Dictionary* CPDF_Dictionary::GetDict() const { +- // The method should be made non-const if we want to not be const. +- // See bug #234. +- return const_cast<CPDF_Dictionary*>(this); ++CPDF_Dictionary* CPDF_Dictionary::GetDict() { ++ return this; ++} ++ ++const CPDF_Dictionary* CPDF_Dictionary::GetDict() const { ++ return this; + } + + bool CPDF_Dictionary::IsDictionary() const { +--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_dictionary.h ++++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_dictionary.h +@@ -33,7 +33,8 @@ class CPDF_Dictionary : public CPDF_Obje + // CPDF_Object: + Type GetType() const override; + std::unique_ptr<CPDF_Object> Clone() const override; +- CPDF_Dictionary* GetDict() const override; ++ CPDF_Dictionary* GetDict() override; ++ const CPDF_Dictionary* GetDict() const override; + bool IsDictionary() const override; + CPDF_Dictionary* AsDictionary() override; + const CPDF_Dictionary* AsDictionary() const override; +--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_reference.cpp ++++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_reference.cpp +@@ -35,11 +35,16 @@ int CPDF_Reference::GetInteger() const { + return obj ? obj->GetInteger() : 0; + } + +-CPDF_Dictionary* CPDF_Reference::GetDict() const { ++CPDF_Dictionary* CPDF_Reference::GetDict() { + CPDF_Object* obj = SafeGetDirect(); + return obj ? obj->GetDict() : nullptr; + } + ++const CPDF_Dictionary* CPDF_Reference::GetDict() const { ++ const CPDF_Object* obj = SafeGetDirect(); ++ return obj ? obj->GetDict() : nullptr; ++} ++ + bool CPDF_Reference::IsReference() const { + return true; + } +--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_reference.h ++++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/parser/cpdf_reference.h +@@ -27,7 +27,8 @@ class CPDF_Reference : public CPDF_Objec + ByteString GetString() const override; + float GetNumber() const override; + int GetInteger() const override; +- CPDF_Dictionary* GetDict() const override; ++ CPDF_Dictionary* GetDict() override; ++ const CPDF_Dictionary* GetDict() const override; + bool IsReference() const override; + CPDF_Reference* AsReference() override; + const CPDF_Reference* AsReference() const override; --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ no-icudtl-dat.patch disable-last_commit_position.patch verbose-gn-bootstrap.patch fix-gcc-8-i386.patch +getdict-overrides.patch
signature.asc
Description: PGP signature