From: Arran Cudbard-Bell Date: Thu, 25 Jan 2018 03:15:56 +0000 (-0700) Subject: If input to %pV was null substitute for (null) as with strings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ccddf67e04303f2e502f6d29f29d25b59f96efa;p=thirdparty%2Ffreeradius-server.git If input to %pV was null substitute for (null) as with strings --- diff --git a/src/lib/util/print.c b/src/lib/util/print.c index 672ba263ed1..399e3058585 100644 --- a/src/lib/util/print.c +++ b/src/lib/util/print.c @@ -649,12 +649,16 @@ char *fr_vasprintf(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. */ - subst = fr_value_box_asprint(NULL, in, '"'); - if (!subst) { - talloc_free(out); - va_end(ap_p); - va_end(ap_q); - return NULL; + if (in) { + subst = fr_value_box_asprint(NULL, in, '"'); + if (!subst) { + talloc_free(out); + va_end(ap_p); + va_end(ap_q); + return NULL; + } + } else { + subst = talloc_strdup(NULL, "(null)"); } do_splice: