summaryrefslogtreecommitdiffstats
path: root/games/zoom/patches/avoid-v6-set-colours-crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games/zoom/patches/avoid-v6-set-colours-crash.patch')
-rw-r--r--games/zoom/patches/avoid-v6-set-colours-crash.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/games/zoom/patches/avoid-v6-set-colours-crash.patch b/games/zoom/patches/avoid-v6-set-colours-crash.patch
new file mode 100644
index 0000000000..75215cc706
--- /dev/null
+++ b/games/zoom/patches/avoid-v6-set-colours-crash.patch
@@ -0,0 +1,18 @@
+Description: Avoid crashing with invalid coordinates
+Author: Alexandre Detiste <alexandre.detiste@gmail.com>
+Bug-Debian: https://bugs.debian.org/813674
+
+--- a/src/v6display.c
++++ b/src/v6display.c
+@@ -498,9 +498,9 @@
+ fg = ACTWIN.fore;
+ if (bg == -2)
+ bg = ACTWIN.back;
+- if (fg == -1)
++ if (fg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
+ fg = DEFAULT_FORE;
+- if (bg == -1)
++ if (bg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
+ bg = DEFAULT_BACK;
+
+ if (bg == -3)