summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/session.c b/session.c
index c19c2ac5a..2b0580b45 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.223 2007/08/23 02:55:51 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.224 2007/09/11 15:47:17 gilles Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -897,8 +897,9 @@ read_environment_file(char ***env, u_int *envsize,
897 ; 897 ;
898 if (!*cp || *cp == '#' || *cp == '\n') 898 if (!*cp || *cp == '#' || *cp == '\n')
899 continue; 899 continue;
900 if (strchr(cp, '\n')) 900
901 *strchr(cp, '\n') = '\0'; 901 cp[strcspn(cp, "\n")] = '\0';
902
902 value = strchr(cp, '='); 903 value = strchr(cp, '=');
903 if (value == NULL) { 904 if (value == NULL) {
904 fprintf(stderr, "Bad line %u in %.100s\n", lineno, 905 fprintf(stderr, "Bad line %u in %.100s\n", lineno,