summaryrefslogtreecommitdiff
path: root/debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch')
-rw-r--r--debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch b/debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch
new file mode 100644
index 00000000..f4f8e12e
--- /dev/null
+++ b/debian/patches/fix-console0001-console-client-xkb-kstoucs.c-find_ucs-assert-precond.patch
@@ -0,0 +1,32 @@
+From dfb9a334a5e7ddf9654cccd0036c342687f6ffbd Mon Sep 17 00:00:00 2001
+From: Diego Nieto Cid <dnietoc@gmail.com>
+Date: Thu, 4 Jun 2015 22:58:09 -0300
+Subject: [PATCH hurd 1/2] * console-client/xkb/kstoucs.c (find_ucs): assert
+ precondition.
+
+---
+ console-client/xkb/kstoucs.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/console-client/xkb/kstoucs.c b/console-client/xkb/kstoucs.c
+index 8471e94..fb62445 100644
+--- a/console-client/xkb/kstoucs.c
++++ b/console-client/xkb/kstoucs.c
+@@ -1,3 +1,5 @@
++#include <assert.h>
++
+ struct ksmap {
+ int keysym;
+ unsigned int ucs;
+@@ -11,6 +13,8 @@ find_ucs (int keysym, struct ksmap *first, struct ksmap *last)
+ {
+ struct ksmap *middle = first + (last - first) / 2;
+
++ assert (first <= last);
++
+ if (middle->keysym == keysym)
+ return middle->ucs; /* base case: needle found. */
+ else if (first == last /* empty search space */
+--
+2.1.4
+