No SIGSEGV on xdvipdfmx
OBS-URL: https://build.opensuse.org/package/show/Publishing/libpaper?expand=0&rev=7
This commit is contained in:
20
libpaper-foul.patch
Normal file
20
libpaper-foul.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
Avoid SIGSEGV in e.g. xdvipdfmx
|
||||
|
||||
---
|
||||
lib/libpaper.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/lib/libpaper.c
|
||||
+++ b/lib/libpaper.c 2022-08-24 07:40:31.736345850 +0000
|
||||
@@ -316,7 +316,10 @@ const char *defaultpapername(void) {
|
||||
|
||||
/* Alias for defaultpapername; its return value must be freed! */
|
||||
const char *systempapername(void) {
|
||||
- return strdup(defaultpapername());
|
||||
+ const char *papername = defaultpapername();
|
||||
+ if (papername == NULL)
|
||||
+ return NULL;
|
||||
+ return strdup(papername);
|
||||
}
|
||||
|
||||
/* Get the default paper size. */
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 24 07:41:07 UTC 2022 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch libpaper-foul.patch
|
||||
* Do not expect that defaultpapername() returns a default paper
|
||||
size but also NULL (nada)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 22 12:37:32 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@@ -25,6 +25,7 @@ Summary: Enables users to indicate their preferred paper size
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://github.com/rrthomas/libpaper
|
||||
Source: %{url}/releases/download/v%{version}/libpaper-%{version}.tar.gz
|
||||
Patch0: libpaper-foul.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: help2man
|
||||
|
Reference in New Issue
Block a user