[arch-commits] Commit in kbd/trunk (PKGBUILD kbd-fix-loadkmap-compat.patch)
Antonio Rojas
arojas at archlinux.org
Mon Oct 7 19:12:00 UTC 2019
Date: Monday, October 7, 2019 @ 19:11:59
Author: arojas
Revision: 364047
Use upstream fix for FS#63565 (FS#64058)
Modified:
kbd/trunk/PKGBUILD
kbd/trunk/kbd-fix-loadkmap-compat.patch
-------------------------------+
PKGBUILD | 4 ++--
kbd-fix-loadkmap-compat.patch | 16 ++++++++++++----
2 files changed, 14 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-07 18:55:21 UTC (rev 364046)
+++ PKGBUILD 2019-10-07 19:11:59 UTC (rev 364047)
@@ -2,7 +2,7 @@
pkgname=kbd
pkgver=2.2.0
-pkgrel=3
+pkgrel=4
pkgdesc="Keytable files and keyboard utilities"
arch=('x86_64')
url="http://www.kbd-project.org"
@@ -19,7 +19,7 @@
replaces=('vlock')
md5sums=('SKIP'
'd869200acbc0aab6a9cafa43cb140d4e'
- '730b1054fbd88b87c27c5565bd7d4fc6')
+ '98f634bf1771834cdb94bc44aa2636ee')
validpgpkeys=(
'7F2A3D07298149A0793C9A4EA45ABA544CFFD434' #Alexey Gladkov
)
Modified: kbd-fix-loadkmap-compat.patch
===================================================================
--- kbd-fix-loadkmap-compat.patch 2019-10-07 18:55:21 UTC (rev 364046)
+++ kbd-fix-loadkmap-compat.patch 2019-10-07 19:11:59 UTC (rev 364047)
@@ -1,14 +1,22 @@
diff --git a/src/libkeymap/dump.c b/src/libkeymap/dump.c
-index 83ac351..a7ba1e5 100644
+index 83ac351..8531b5a 100644
--- a/src/libkeymap/dump.c
+++ b/src/libkeymap/dump.c
-@@ -72,7 +72,7 @@ int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd)
+@@ -72,9 +72,14 @@ int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd)
continue;
for (j = 0; j < NR_KEYS / 2; j++) {
- int v = lk_get_key(ctx, i, j);
-+ short v = (short)lk_get_key(ctx, i, j);
++ int value = lk_get_key(ctx, i, j);
- if (fwrite(&v, sizeof(v), 1, fd) != 1)
+- if (fwrite(&v, sizeof(v), 1, fd) != 1)
++ if (value < 0 || value > USHRT_MAX) {
++ ERR(ctx, _("can not bind key %d to value %d because it is too large"), j, value);
++ goto fail;
++ }
++
++ if (fwrite(&value, sizeof(unsigned short), 1, fd) != 1)
goto fail;
+ }
+ }
More information about the arch-commits
mailing list