SHA256
1
0
forked from pool/kbd

Accepting request 946907 from home:favogt:branches:Base:System

- Add patch to fix random doubling of font sizes (bsc#1194698):
  * 0001-libkfont-Initialize-kfont_context-options.patch

OBS-URL: https://build.opensuse.org/request/show/946907
OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=139
This commit is contained in:
Anna Maresova 2022-01-19 13:05:23 +00:00 committed by Git OBS Bridge
parent 32a255a8ea
commit 39d4f056b3
3 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 501efd7b873e1462da986f763398ea8d98df2767 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Fri, 14 Jan 2022 15:22:24 +0100
Subject: [PATCH] libkfont: Initialize kfont_context->options
kfont_init did not set the options member, so it had essentially random
content. This made setfont behave weirdly.
Switch to calloc for good measure to avoid issues like this.
Signed-off-by: Fabian Vogt <fvogt@suse.de>
---
src/libkfont/context.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libkfont/context.c b/src/libkfont/context.c
index 9ce0975351be..d5a766606489 100644
--- a/src/libkfont/context.c
+++ b/src/libkfont/context.c
@@ -143,11 +143,12 @@ kfont_init(const char *prefix, struct kfont_context **ctx)
{
struct kfont_context *p;
- if (!(p = malloc(sizeof(*p))))
+ if (!(p = calloc(1, sizeof(*p))))
return -EX_OSERR;
p->progname = prefix;
p->verbose = 0;
+ p->options = 0;
p->log_fn = log_stderr;
p->mapdirpath = mapdirpath;
p->mapsuffixes = mapsuffixes;
--
2.34.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 17 08:06:01 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Add patch to fix random doubling of font sizes (bsc#1194698):
* 0001-libkfont-Initialize-kfont_context-options.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 4 19:17:16 UTC 2021 - Stefan Dirsch <sndirsch@suse.com> Mon Oct 4 19:17:16 UTC 2021 - Stefan Dirsch <sndirsch@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package kbd # spec file for package kbd
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -50,6 +50,8 @@ Source43: repack_kbd.sh
Source44: xml2lst.pl Source44: xml2lst.pl
Source45: genmap4systemd.sh Source45: genmap4systemd.sh
Patch0: kbd-1.15.2-prtscr_no_sigquit.patch Patch0: kbd-1.15.2-prtscr_no_sigquit.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-libkfont-Initialize-kfont_context-options.patch
Patch2: kbd-1.15.2-unicode_scripts.patch Patch2: kbd-1.15.2-unicode_scripts.patch
Patch3: kbd-1.15.2-docu-X11R6-xorg.patch Patch3: kbd-1.15.2-docu-X11R6-xorg.patch
Patch4: kbd-1.15.2-sv-latin1-keycode10.patch Patch4: kbd-1.15.2-sv-latin1-keycode10.patch
@ -117,6 +119,7 @@ cp -fp %{SOURCE20} .
cp -fp %{SOURCE21} . cp -fp %{SOURCE21} .
cp -fp %{SOURCE22} . cp -fp %{SOURCE22} .
%patch0 -p1 %patch0 -p1
%patch1 -p1
%patch2 %patch2
%patch3 %patch3
%patch4 -p1 %patch4 -p1