zathura: fix buffer overflow.

Fixes crash when trying to use synctex functionality.

Fixes: #31722
This commit is contained in:
Érico Nogueira 2021-07-15 15:40:05 -03:00
parent 91642a97ab
commit 2418e828ee
2 changed files with 14 additions and 1 deletions

View file

@ -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;
}

View file

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