aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-15 19:42:29 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-05-17 15:54:26 +0200
commit148eda36d486c0af019267a644c08d5e8c2f4f8b (patch)
tree2494f2c6fbe887ec65003974e6bfd1fa0d2ce4f2
parent6981e9bb0cd51d22b06dd4241a55f6e08f60e75d (diff)
downloadnx-libs-148eda36d486c0af019267a644c08d5e8c2f4f8b.tar.gz
nx-libs-148eda36d486c0af019267a644c08d5e8c2f4f8b.tar.bz2
nx-libs-148eda36d486c0af019267a644c08d5e8c2f4f8b.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;
}
}