[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#929498: Division by zero error



Package: src:nx-libs
Severity: important
Version: 2:3.5.99.19-2
Tags: patch fixed-upstream
Forwareded: https://github.com/ArcticaProject/nx-libs/issues/808

On the nx-libs upstream issue tracker, an occasional division-by-zero error in nxagent's xkb extension got recently reported.

The issue has been fixed upstream by this PR:
https://github.com/ArcticaProject/nx-libs/pull/809

Mike
--

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

>From 4df77fe73fe03dc3098190f3702c0d5ab415968a Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller <uli42@gmx.de>
Date: Wed, 15 May 2019 19:42:29 +0200
Subject: [PATCH 1/2] xkbUtils.c: Catch division by zero

Fixes ArcticaProject/nx-libs#808
---
 nx-X11/programs/Xserver/xkb/xkbUtils.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c
index 028f32454..21a5ce76a 100644
--- a/nx-X11/programs/Xserver/xkb/xkbUtils.c
+++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c
@@ -685,6 +685,10 @@ unsigned	act;
 	    else group= newGroup;
 	}
 	else {
+#ifdef NXAGENT_SERVER
+	  /* we have seen division by zero here */
+	  if (ctrls->num_groups != 0)
+#endif
 	    group%= ctrls->num_groups;
 	}
     }
-- 
2.20.1

Attachment: pgpNFEAU_GmTP.pgp
Description: Digitale PGP-Signatur


Reply to: