[openssh-commits] [openssh] 02/04: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Dec 7 13:47:26 AEDT 2015
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 8b56e59714d87181505e4678f0d6d39955caf10e
Author: tobias at openbsd.org <tobias at openbsd.org>
Date: Fri Dec 4 21:51:06 2015 +0000
upstream commit
Properly handle invalid %-format by calling fatal.
ok deraadt, djm
Upstream-ID: 5692bce7d9f6eaa9c488cb93d3b55e758bef1eac
---
misc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/misc.c b/misc.c
index b358a03..9d11d28 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.99 2015/10/24 08:34:09 sthen Exp $ */
+/* $OpenBSD: misc.c,v 1.100 2015/12/04 21:51:06 tobias Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -604,6 +604,8 @@ percent_expand(const char *string, ...)
/* %% case */
if (*string == '%')
goto append;
+ if (*string == '\0')
+ fatal("%s: invalid format", __func__);
for (j = 0; j < num_keys; j++) {
if (strchr(keys[j].key, *string) != NULL) {
i = strlcat(buf, keys[j].repl, sizeof(buf));
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list