From 2418e828eeb5c3114e0f262c8d096039a365ea33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Thu, 15 Jul 2021 15:40:05 -0300 Subject: [PATCH] zathura: fix buffer overflow. Fixes crash when trying to use synctex functionality. Fixes: #31722 --- srcpkgs/zathura/patches/fix-buffer-overflow.patch | 13 +++++++++++++ srcpkgs/zathura/template | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/zathura/patches/fix-buffer-overflow.patch diff --git a/srcpkgs/zathura/patches/fix-buffer-overflow.patch b/srcpkgs/zathura/patches/fix-buffer-overflow.patch new file mode 100644 index 00000000000..f11b343b184 --- /dev/null +++ b/srcpkgs/zathura/patches/fix-buffer-overflow.patch @@ -0,0 +1,13 @@ +diff --git a/zathura/utils.c b/zathura/utils.c +index b4b058f..6e1910e 100644 +--- a/zathura/utils.c ++++ b/zathura/utils.c +@@ -401,7 +401,7 @@ rectangle_to_points(void* vrect, void* vlist) { + + static void + append_unique_uint(girara_list_t* list, const unsigned int v) { +- double* p = g_try_malloc(sizeof(v)); ++ double* p = g_try_malloc(sizeof(*p)); + if (p == NULL) { + return; + } diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template index de693380162..5495c235fd9 100644 --- a/srcpkgs/zathura/template +++ b/srcpkgs/zathura/template @@ -1,7 +1,7 @@ # Template file for 'zathura' pkgname=zathura version=0.4.7 -revision=2 +revision=3 build_style=meson configure_args="-Dsynctex=enabled" hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils