pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/xbomb games/xbomb: Add patch to avoid UB and/or ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/123f9269686b
branches:  trunk
changeset: 402293:123f9269686b
user:      jakllsch <jakllsch%pkgsrc.org@localhost>
date:      Sun Oct 06 14:41:07 2019 +0000

description:
games/xbomb: Add patch to avoid UB and/or segfault on startup

diffstat:

 games/xbomb/distinfo                |   3 ++-
 games/xbomb/patches/patch-xwindow.c |  16 ++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 8f0c34913a37 -r 123f9269686b games/xbomb/distinfo
--- a/games/xbomb/distinfo      Sun Oct 06 14:01:20 2019 +0000
+++ b/games/xbomb/distinfo      Sun Oct 06 14:41:07 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2016/03/30 10:00:07 jperkin Exp $
+$NetBSD: distinfo,v 1.6 2019/10/06 14:41:07 jakllsch Exp $
 
 SHA1 (xbomb-2.2.tgz) = 065d9283c92ff0dca844b637f237a381b1ad72c0
 RMD160 (xbomb-2.2.tgz) = 51a212d8cbe62d765e75751ae7b3d341ce6a3ada
@@ -6,3 +6,4 @@
 Size (xbomb-2.2.tgz) = 24872 bytes
 SHA1 (patch-aa) = e25b71c414b67d8d7d588cabbd8da7e667678835
 SHA1 (patch-ab) = 94ba453322e35eb07a81f223e36563dceac04bdc
+SHA1 (patch-xwindow.c) = e0e216c48214c1b976f8d18359ef97e4f9438f71
diff -r 8f0c34913a37 -r 123f9269686b games/xbomb/patches/patch-xwindow.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xbomb/patches/patch-xwindow.c       Sun Oct 06 14:41:07 2019 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-xwindow.c,v 1.1 2019/10/06 14:41:07 jakllsch Exp $
+
+Avoid segfault in InitialiseX()
+
+--- xwindow.c.orig     2008-01-05 19:24:16.000000000 +0000
++++ xwindow.c
+@@ -245,7 +245,8 @@ void InitialiseX(int *argc,char **argv)
+  values.font=resources.fontstruct->fid;
+  for(i=0;i<NUM_GC;i++)
+    {
+-    values.foreground=resources.colours[i];
++    if(i<(sizeof(resources.colours)/sizeof(resources.colours[0])))
++       values.foreground=resources.colours[i];
+     if(i==GC_UNSEEN)
+       {
+        GC tempgc;



Home | Main Index | Thread Index | Old Index