]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
in may be NULL
authorAlan T. DeKok <aland@freeradius.org>
Sat, 22 Jul 2023 15:48:26 +0000 (11:48 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 22 Jul 2023 15:51:42 +0000 (11:51 -0400)
src/lib/util/print.c

index 22571db2b4342dd8b747227819857cc59c686823..76e9e600c7ab62e7abf51f1abfdd44092593b6bb 100644 (file)
@@ -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);