Accepting request 828156 from home:jirislaby:branches:Base:System
- add libkeymap-Fix-mk_mapname-for-the-plain-map.patch OBS-URL: https://build.opensuse.org/request/show/828156 OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=125
This commit is contained in:
parent
8de4608e45
commit
051fc8093e
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 20 11:34:32 UTC 2020 - Jiri Slaby <jslaby@suse.com>
|
||||||
|
|
||||||
|
- add libkeymap-Fix-mk_mapname-for-the-plain-map.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 21 13:08:11 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
|
Tue Apr 21 13:08:11 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
2
kbd.spec
2
kbd.spec
@ -69,6 +69,7 @@ Patch13: kbd-1.15.5-loadkeys-search-path.patch
|
|||||||
Patch14: kbdsettings-nox86.patch
|
Patch14: kbdsettings-nox86.patch
|
||||||
# PATCH-FIX-SLE kbd-unicode-fxxx.patch sbrabec@suse.com bsc1085432 -- Do not cause error on UNICODE characters >= 0xF000 (e. g. ligature fi)
|
# PATCH-FIX-SLE kbd-unicode-fxxx.patch sbrabec@suse.com bsc1085432 -- Do not cause error on UNICODE characters >= 0xF000 (e. g. ligature fi)
|
||||||
Patch15: kbd-unicode-fxxx.patch
|
Patch15: kbd-unicode-fxxx.patch
|
||||||
|
Patch16: libkeymap-Fix-mk_mapname-for-the-plain-map.patch
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
@ -133,6 +134,7 @@ cp -fp %{SOURCE22} .
|
|||||||
%patch14 -p0
|
%patch14 -p0
|
||||||
%endif
|
%endif
|
||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
|
%patch16 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
for i in `find data/keymaps/mac -type f` ; do
|
for i in `find data/keymaps/mac -type f` ; do
|
||||||
|
52
libkeymap-Fix-mk_mapname-for-the-plain-map.patch
Normal file
52
libkeymap-Fix-mk_mapname-for-the-plain-map.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From: Alexey Gladkov <gladkov.alexey@gmail.com>
|
||||||
|
Date: Sun, 23 Feb 2020 18:24:59 +0100
|
||||||
|
Subject: libkeymap: Fix mk_mapname for the plain map
|
||||||
|
Patch-mainline: 2.3
|
||||||
|
Git-commit: 88ae58fe8a223d11307accc36cc293133a18e7ac
|
||||||
|
|
||||||
|
mk_mapname did not correctly return "plain" for the plain map (no modifier set)
|
||||||
|
if it had already been called, as it did not correctly reset the static buffer
|
||||||
|
that it uses for the map name. When mk_mapname is called for the first time
|
||||||
|
from the first loop in lk_dump_ctable, all is fine, since buf has not been used
|
||||||
|
yet and it is initialised to 0. However, when it is called again for the plain
|
||||||
|
map from the second loop in lk_dump_ctable, buf already contains a value (left
|
||||||
|
over from the last iteration in the first loop), and then strcat appends
|
||||||
|
"plain" to that value instead of overwriting it, resulting in a bogus value.
|
||||||
|
|
||||||
|
Reported-by: Javier Pello <javier.pello@urjc.es>
|
||||||
|
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
|
||||||
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||||
|
---
|
||||||
|
src/libkeymap/dump.c | 2 +-
|
||||||
|
tests/data/dumpkeys-mktable/defkeymap.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libkeymap/dump.c b/src/libkeymap/dump.c
|
||||||
|
index 8531b5aa3d91..d67eefaada54 100644
|
||||||
|
--- a/src/libkeymap/dump.c
|
||||||
|
+++ b/src/libkeymap/dump.c
|
||||||
|
@@ -101,7 +101,7 @@ mk_mapname(char modifier)
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!modifier) {
|
||||||
|
- strcat(buf, "plain");
|
||||||
|
+ strcpy(buf, "plain");
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
buf[0] = 0;
|
||||||
|
diff --git a/tests/data/dumpkeys-mktable/defkeymap.c b/tests/data/dumpkeys-mktable/defkeymap.c
|
||||||
|
index e831316a1ff3..5d9a3aaeff8c 100644
|
||||||
|
--- a/tests/data/dumpkeys-mktable/defkeymap.c
|
||||||
|
+++ b/tests/data/dumpkeys-mktable/defkeymap.c
|
||||||
|
@@ -565,7 +565,7 @@ static unsigned short shift_altgr_ctrl_alt_map[NR_KEYS] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
ushort *key_maps[MAX_NR_KEYMAPS] = {
|
||||||
|
- shift_altgr_ctrl_altplain_map, shift_map, altgr_map, shift_altgr_map,
|
||||||
|
+ plain_map, shift_map, altgr_map, shift_altgr_map,
|
||||||
|
ctrl_map, shift_ctrl_map, altgr_ctrl_map, shift_altgr_ctrl_map,
|
||||||
|
alt_map, shift_alt_map, altgr_alt_map, shift_altgr_alt_map,
|
||||||
|
ctrl_alt_map, shift_ctrl_alt_map, altgr_ctrl_alt_map, shift_altgr_ctrl_alt_map, 0
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user