aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-06-16 12:39:21 +0800
committermarcus <marcus@FreeBSD.org>2003-06-16 12:39:21 +0800
commit059c7714f7a71aef7a0218541b150babc9d34598 (patch)
tree092478af3b1202af5fc475a55807d4feeb0f23b2
parentee8b1f1709c4adbef218c35ad455ffe440ad0b14 (diff)
downloadfreebsd-ports-gnome-059c7714f7a71aef7a0218541b150babc9d34598.tar.gz
freebsd-ports-gnome-059c7714f7a71aef7a0218541b150babc9d34598.tar.zst
freebsd-ports-gnome-059c7714f7a71aef7a0218541b150babc9d34598.zip
Don't crash when checking when checking input.
Submitted by: Sergey Akifyev <asa@gascom.ru>
-rw-r--r--x11/gswitchit/Makefile1
-rw-r--r--x11/gswitchit/files/patch-common-gswitchit_config.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/x11/gswitchit/Makefile b/x11/gswitchit/Makefile
index e151050145bf..12e7b3dbd0e2 100644
--- a/x11/gswitchit/Makefile
+++ b/x11/gswitchit/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gswitchit
PORTVERSION= 2.3.1
+PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gswitchit
diff --git a/x11/gswitchit/files/patch-common-gswitchit_config.c b/x11/gswitchit/files/patch-common-gswitchit_config.c
new file mode 100644
index 000000000000..bcbd68447e4b
--- /dev/null
+++ b/x11/gswitchit/files/patch-common-gswitchit_config.c
@@ -0,0 +1,11 @@
+--- common/gswitchit_config.c.orig Mon Jun 9 09:02:24 2003
++++ common/gswitchit_config.c Mon Jun 9 09:03:28 2003
+@@ -660,7 +660,7 @@
+ for( i = data.numOptions; --i >= 0; )
+ {
+ char group[XKL_MAX_CI_NAME_LENGTH];
+- char *delim = strchr( *p, ':' );
++ char *delim = *p ? strchr( *p, ':' ) : NULL;
+ int len;
+ if( ( delim != NULL ) &&
+ ( ( len = ( delim - *p ) ) < XKL_MAX_CI_NAME_LENGTH ) )