- Fix crash when TERM is undefined in environment

PR:		ports/84168
Submitted by:	Thierry Besancon <Thierry.Besancon@math.jussieu.fr>
This commit is contained in:
Pav Lucistnik 2005-07-28 22:31:21 +00:00
parent b5963770b4
commit 8345b2f467
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140351
4 changed files with 24 additions and 2 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= portmanager
PORTVERSION= 0.2.9
PORTREVISION= 4
PORTREVISION= 5
#-----------------------------------------
#for local use, remove before submitting PR
CATEGORIES= sysutils

View file

@ -0,0 +1,11 @@
--- portmanager/portmanager.c.orig Fri Jul 29 00:26:53 2005
+++ portmanager/portmanager.c Fri Jul 29 00:27:47 2005
@@ -134,7 +134,7 @@
/*
* set xterm title
*/
- if( !strncmp( getenv("TERM"), "xterm", 5 ) )
+ if( getenv("TERM") && !strncmp( getenv("TERM"), "xterm", 5 ) )
{
stringSize = strlen( id )
+ 1

View file

@ -7,7 +7,7 @@
PORTNAME= portmanager
PORTVERSION= 0.2.9
PORTREVISION= 4
PORTREVISION= 5
#-----------------------------------------
#for local use, remove before submitting PR
CATEGORIES= sysutils

View file

@ -0,0 +1,11 @@
--- portmanager/portmanager.c.orig Fri Jul 29 00:26:53 2005
+++ portmanager/portmanager.c Fri Jul 29 00:27:47 2005
@@ -134,7 +134,7 @@
/*
* set xterm title
*/
- if( !strncmp( getenv("TERM"), "xterm", 5 ) )
+ if( getenv("TERM") && !strncmp( getenv("TERM"), "xterm", 5 ) )
{
stringSize = strlen( id )
+ 1