summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2022-02-11 00:43:57 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2022-02-11 00:43:57 +0000
commit1b0b1afe0e697438f326d700d8bc19cc0af4eb1e (patch)
tree6cbc5225db78b09b224b09a8a8015e003fb61f6b
parentf632d0ecacbac3f603c28ab104d4ee46c645d148 (diff)
Always initialize delim before passing to hpdelim2 which might not set it.
Found by the Valgrind tests on github, ok deraadt@
-rw-r--r--usr.bin/ssh/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index 1c86f684c71..1c3248955f9 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.173 2022/02/08 08:59:12 dtucker Exp $ */
+/* $OpenBSD: misc.c,v 1.174 2022/02/11 00:43:56 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -676,7 +676,7 @@ hpdelim2(char **cp, char *delim)
char *
hpdelim(char **cp)
{
- char *r, delim;
+ char *r, delim = '\0';
r = hpdelim2(cp, &delim);
if (delim == '/')