[openssh-commits] [openssh] 02/02: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat May 20 14:30:28 AEST 2017
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 947a3e829a5b8832a4768fd764283709a4ca7955
Author: djm at openbsd.org <djm at openbsd.org>
Date: Sat May 20 02:35:47 2017 +0000
upstream commit
there's no reason to artificially limit the key path
here, just check that it fits PATH_MAX; spotted by Matthew Patton
Upstream-ID: 858addaf2009c9cf04d80164a41b2088edb30b58
---
readconf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/readconf.c b/readconf.c
index aee5a8a7..4be5327a 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.275 2017/04/30 23:18:22 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.276 2017/05/20 02:35:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -438,8 +438,8 @@ add_identity_file(Options *options, const char *dir, const char *filename,
if (dir == NULL) /* no dir, filename is absolute */
path = xstrdup(filename);
- else
- (void)xasprintf(&path, "%.100s%.100s", dir, filename);
+ else if (xasprintf(&path, "%s%s", dir, filename) >= PATH_MAX)
+ fatal("Identity file path %s too long", path);
/* Avoid registering duplicates */
for (i = 0; i < options->num_identity_files; i++) {
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list