[openssh-commits] [openssh] 01/01: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Feb 3 16:07:32 AEDT 2017


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit c924b2ef941028a1f31e6e94f54dfeeeef462a4e
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Feb 3 05:05:56 2017 +0000

    upstream commit
    
    allow form-feed characters at EOL; bz#2431 ok dtucker@
    
    Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2
---
 readconf.c |  6 +++---
 servconf.c | 11 ++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/readconf.c b/readconf.c
index 72b4a63..6c93440 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.266 2017/01/30 00:38:50 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.267 2017/02/03 05:05:56 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -842,11 +842,11 @@ process_config_line_depth(Options *options, struct passwd *pw, const char *host,
 		activep = &cmdline;
 	}
 
-	/* Strip trailing whitespace */
+	/* Strip trailing whitespace. Allow \f (form feed) at EOL only */
 	if ((len = strlen(line)) == 0)
 		return 0;
 	for (len--; len > 0; len--) {
-		if (strchr(WHITESPACE, line[len]) == NULL)
+		if (strchr(WHITESPACE "\f", line[len]) == NULL)
 			break;
 		line[len] = '\0';
 	}
diff --git a/servconf.c b/servconf.c
index c9105a5..1880b8c 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
 
-/* $OpenBSD: servconf.c,v 1.302 2017/01/06 03:45:41 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.303 2017/02/03 05:05:56 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -966,6 +966,15 @@ process_server_config_line(ServerOptions *options, char *line,
 	long long val64;
 	const struct multistate *multistate_ptr;
 
+	/* Strip trailing whitespace. Allow \f (form feed) at EOL only */
+	if ((len = strlen(line)) == 0)
+		return 0;
+	for (len--; len > 0; len--) {
+		if (strchr(WHITESPACE "\f", line[len]) == NULL)
+			break;
+		line[len] = '\0';
+	}
+
 	cp = line;
 	if ((arg = strdelim(&cp)) == NULL)
 		return 0;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list