From 06abf28dab1008bcb46bfe0d327dccf52b0ba919 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 5 Dec 2017 17:46:57 -0600 Subject: [PATCH] libpkgconf: client: handle NULL client in pkgconf_trace calls --- libpkgconf/client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpkgconf/client.c b/libpkgconf/client.c index f5f4717..811e043 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -324,6 +324,9 @@ pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t linen size_t len; va_list va; + if (client == NULL) + return false; + len = snprintf(errbuf, sizeof errbuf, "%s:" SIZE_FMT_SPECIFIER " [%s]: ", filename, lineno, funcname); va_start(va, format);