From: Alan T. DeKok Date: Sat, 22 Jul 2023 15:48:26 +0000 (-0400) Subject: in may be NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b06efca39cc458b3086365c025b8052c5694138d;p=thirdparty%2Ffreeradius-server.git in may be NULL --- diff --git a/src/lib/util/print.c b/src/lib/util/print.c index 22571db2b43..76e9e600c7a 100644 --- a/src/lib/util/print.c +++ b/src/lib/util/print.c @@ -680,7 +680,7 @@ static char *fr_vasprintf_internal(TALLOC_CTX *ctx, char const *fmt, va_list ap, * string need to occur in the NULL ctx so we don't fragment * any pool associated with it. */ - if (unlikely(in->secret && suppress_secrets)) { + if (unlikely(in && in->secret && suppress_secrets)) { subst = talloc_typed_strdup(NULL, "<<< secret >>>"); } else if (in) { @@ -805,7 +805,7 @@ static char *fr_vasprintf_internal(TALLOC_CTX *ctx, char const *fmt, va_list ap, PAIR_VERIFY(in); - if (unlikely(in->data.secret && suppress_secrets)) { + if (unlikely(in && in->data.secret && suppress_secrets)) { fr_pair_aprint_secure(NULL, &subst, NULL, in); } else { fr_pair_aprint(NULL, &subst, NULL, in);