diff --git a/x3270-handle-missing-font.patch b/x3270-handle-missing-font.patch new file mode 100644 index 0000000..a2e56bd --- /dev/null +++ b/x3270-handle-missing-font.patch @@ -0,0 +1,13 @@ +--- x3270/screen.c 2020-10-30 13:35:58.238416347 +0100 ++++ x3270/screen.c 2020-10-30 13:39:12.721353850 +0100 +@@ -4686,7 +4686,9 @@ + } + } + +- g = XLoadQueryFont(display, best); ++ if ((g = XLoadQueryFont(display, best)) == NULL) { ++ return xs_buffer("Font %s could not be loaded", best); ++ } + set_font_globals(g, /*name*/best, best, g->fid, is_dbcs); + return NULL; + } diff --git a/x3270.changes b/x3270.changes index 39fcf2b..ffb98e8 100644 --- a/x3270.changes +++ b/x3270.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Feb 11 22:21:36 UTC 2021 - Mark Post + +- Added x3270-handle-missing-font.patch (bsc#1177104) + In some cases when fonts are present locally but are not present + in the fontpath, x3270 can crash due to a segfault caused by + XLoadQueryFont() returning NULL in lff_single(). + ------------------------------------------------------------------- Mon Nov 9 07:28:01 UTC 2020 - Bernhard Wiedemann diff --git a/x3270.spec b/x3270.spec index 8aa66d2..0c8e4d7 100644 --- a/x3270.spec +++ b/x3270.spec @@ -1,7 +1,7 @@ # # spec file for package x3270 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2016,2020,2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Source0: http://download.sourceforge.net/%{name}/%{_fullname}-src.tgz Source1: http://download.sourceforge.net/%{name}/x026-%{_x026ver}.tgz Source2: x3270.desktop Patch0: mknod.patch +Patch1: x3270-handle-missing-font.patch Patch100: usr_local_bin.patch Patch102: x026-offset.diff Patch105: x3270-missing-include.patch @@ -103,6 +104,7 @@ x026 is a fun toy which emulates an x026 puncher. # -a fter changing into all3270, expand sources %setup -q -n suite3270-%{version} -a1 %patch0 +%patch1 %patch100 %patch102 %patch105 -p1