From 29cfbe3cc6ee1f66f843c10a3adaa59587a5f6d8 Mon Sep 17 00:00:00 2001 From: dtucker Date: Fri, 11 Feb 2022 00:43:56 +0000 Subject: [PATCH] Always initialize delim before passing to hpdelim2 which might not set it. Found by the Valgrind tests on github, ok deraadt@ --- usr.bin/ssh/misc.c | 4 ++-- 1 file 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 == '/') -- 2.20.1