diff options
author | des <des@FreeBSD.org> | 2003-02-10 11:01:42 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-02-10 11:01:42 +0000 |
commit | aabe9fad91e54670ede716fbd98f6bf723f4a0ca (patch) | |
tree | a20d38ec76b944c77d3ae6997b9f253df3fec12b /audio/mpg123 | |
parent | 90b0b66873956e6346e1c76aa94b1cc2e9381500 (diff) | |
download | FreeBSD-ports-aabe9fad91e54670ede716fbd98f6bf723f4a0ca.zip FreeBSD-ports-aabe9fad91e54670ede716fbd98f6bf723f4a0ca.tar.gz |
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>
Diffstat (limited to 'audio/mpg123')
-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 cddc314..38a7ffa 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 0000000..3080572 --- /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); + } + } |