diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-02-10 11:01:42 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-02-10 11:01:42 +0000 |
commit | 14839ee02dceb1f4bb3052299b40438bae770e8e (patch) | |
tree | ab0892e78c7e00ed33c2438ab3f297b07a4b3141 /audio | |
parent | upgrade to 5.3.8 (diff) |
Take care not to dereference the return value from getenv(3) without first
checking that it's not NULL.
PR: ports/45252
Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
Notes
Notes:
svn path=/head/; revision=75234
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mpg123/Makefile | 2 | ||||
-rw-r--r-- | audio/mpg123/files/patch-ag | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/audio/mpg123/Makefile b/audio/mpg123/Makefile index cddc314206b5..38a7ffa009eb 100644 --- a/audio/mpg123/Makefile +++ b/audio/mpg123/Makefile @@ -7,7 +7,7 @@ PORTNAME= mpg123 PORTVERSION= 0.59r -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= audio ipv6 MASTER_SITES= http://www.mpg123.de/mpg123/ \ http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123/ diff --git a/audio/mpg123/files/patch-ag b/audio/mpg123/files/patch-ag new file mode 100644 index 000000000000..3080572f240b --- /dev/null +++ b/audio/mpg123/files/patch-ag @@ -0,0 +1,17 @@ +--- mpg123.c.orig Fri Jun 18 14:18:11 1999 ++++ mpg123.c Mon Feb 10 11:58:08 2003 +@@ -920,10 +920,10 @@ + + #if !defined(GENERIC) + { +- const char *term_type; +- term_type = getenv("TERM"); +- if (!strcmp(term_type,"xterm")) +- { ++ const char *term_type; ++ ++ if (((term_type = getenv("TERM")) != NULL) ++ && (!strcmp(term_type,"xterm"))) { + fprintf(stderr, "\033]0;%s\007", filename); + } + } |