SHA256
1
0
forked from pool/x3270

Accepting request 871352 from home:markkp:branches:Base:System

- 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().

OBS-URL: https://build.opensuse.org/request/show/871352
OBS-URL: https://build.opensuse.org/package/show/Base:System/x3270?expand=0&rev=54
This commit is contained in:
Mark Post 2021-02-12 06:57:25 +00:00 committed by Git OBS Bridge
parent e11330ae68
commit e199036ed3
3 changed files with 24 additions and 1 deletions

View File

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

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Feb 11 22:21:36 UTC 2021 - Mark Post <mpost@suse.com>
- 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 <bwiedemann@suse.com>

View File

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