[arch-commits] Commit in poppler/trunk (2 files)

Jan Steffens heftig at archlinux.org
Wed Jun 2 14:46:23 UTC 2021


    Date: Wednesday, June 2, 2021 @ 14:46:22
  Author: heftig
Revision: 416965

21.06.0-1: Bump and probable fix for FS#70909

Added:
  poppler/trunk/0001-glib-Fix-type-in-poppler_rectangle_free.patch
Modified:
  poppler/trunk/PKGBUILD

----------------------------------------------------+
 0001-glib-Fix-type-in-poppler_rectangle_free.patch |   28 +++++++++++++++++++
 PKGBUILD                                           |   10 +++++-
 2 files changed, 36 insertions(+), 2 deletions(-)

Added: 0001-glib-Fix-type-in-poppler_rectangle_free.patch
===================================================================
--- 0001-glib-Fix-type-in-poppler_rectangle_free.patch	                        (rev 0)
+++ 0001-glib-Fix-type-in-poppler_rectangle_free.patch	2021-06-02 14:46:22 UTC (rev 416965)
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 1 Jun 2021 22:00:00 +0000
+Subject: [PATCH] glib: Fix type in poppler_rectangle_free
+
+e3fed321f230 changed the allocation to use PopplerRectangleExtended. We
+need to change the free to match, otherwise the slice allocator can get
+confused.
+
+Fixes https://gitlab.freedesktop.org/poppler/poppler/-/issues/1087
+---
+ glib/poppler-page.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
+index 7536cfcb..e81c1e12 100644
+--- a/glib/poppler-page.cc
++++ b/glib/poppler-page.cc
+@@ -1663,7 +1663,8 @@ PopplerRectangle *poppler_rectangle_copy(PopplerRectangle *rectangle)
+  */
+ void poppler_rectangle_free(PopplerRectangle *rectangle)
+ {
+-    g_slice_free(PopplerRectangle, rectangle);
++    auto ext_rectangle = reinterpret_cast<PopplerRectangleExtended *>(rectangle);
++    g_slice_free(PopplerRectangleExtended, ext_rectangle);
+ }
+ 
+ /**

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-02 12:55:32 UTC (rev 416964)
+++ PKGBUILD	2021-06-02 14:46:22 UTC (rev 416965)
@@ -3,7 +3,7 @@
 
 pkgbase=poppler
 pkgname=('poppler' 'poppler-glib' 'poppler-qt5' 'poppler-qt6')
-pkgver=21.05.0
+pkgver=21.06.0
 pkgrel=1
 arch=(x86_64)
 license=('GPL')
@@ -14,14 +14,20 @@
 url="https://poppler.freedesktop.org/"
 # https://gitlab.freedesktop.org/poppler/poppler
 source=(https://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.xz{,.sig}
+        0001-glib-Fix-type-in-poppler_rectangle_free.patch
         test::git+https://anongit.freedesktop.org/git/poppler/test/#commit=03a4b9eb854a06a83c465e82de601796c458bbe9)
-sha256sums=('dafd537b680fad1215bc40fc53d1f38e8449d7c185bc60d5a89e1d26c90dbd8c'
+sha256sums=('4b440708eafdf07a1405e06744c66ac54a5af51a0e38ab17a46fbaff47278342'
             'SKIP'
+            '9b7059cf64fb8562ceb27f16c0fd40d33c65db3341a0d6eb45facfaa6647c98f'
             'SKIP')
 validpgpkeys=('CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7') # "Albert Astals Cid <aacid at kde.org>"
 
 prepare() {
   mkdir build
+  cd ${pkgbase}-${pkgver}
+
+  # https://bugs.archlinux.org/task/70909
+  patch -Np1 -i ../0001-glib-Fix-type-in-poppler_rectangle_free.patch
 }
 
 build() {



More information about the arch-commits mailing list