aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-15 19:42:29 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-05-17 17:49:26 +0200
commit4df77fe73fe03dc3098190f3702c0d5ab415968a (patch)
tree2494f2c6fbe887ec65003974e6bfd1fa0d2ce4f2
parent6981e9bb0cd51d22b06dd4241a55f6e08f60e75d (diff)
downloadnx-libs-4df77fe73fe03dc3098190f3702c0d5ab415968a.tar.gz
nx-libs-4df77fe73fe03dc3098190f3702c0d5ab415968a.tar.bz2
nx-libs-4df77fe73fe03dc3098190f3702c0d5ab415968a.zip
xkbUtils.c: Catch division by zero
Fixes ArcticaProject/nx-libs#808
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbUtils.c4
1 files changed, 4 insertions, 0 deletions
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;
}
}