1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Don't crash when checking when checking input.

Submitted by:	Sergey Akifyev <asa@gascom.ru>
This commit is contained in:
Joe Marcus Clarke 2003-06-16 04:39:21 +00:00
parent 43d383568a
commit a37ce0a137
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83093
2 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= gswitchit
PORTVERSION= 2.3.1
PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gswitchit

View File

@ -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 ) )