From 50b9e4a4514697ffb9592200e722de6b427cb9ff Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Fri, 11 Feb 2022 00:43:56 +0000 Subject: [PATCH] upstream: Always initialize delim before passing to hpdelim2 which might not set it. Found by the Valgrind tests on github, ok deraadt@ OpenBSD-Commit-ID: c830c0db185ca43beff3f41c19943c724b4f636d --- misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index dd1922e9c..417498deb 100644 --- a/misc.c +++ b/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. @@ -723,7 +723,7 @@ hpdelim2(char **cp, char *delim) char * hpdelim(char **cp) { - char *r, delim; + char *r, delim = '\0'; r = hpdelim2(cp, &delim); if (delim == '/')