From 07a4f778d380f3ed4f251e4cffec228e4f5ba564 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Thu, 2 Dec 2021 00:08:34 +0200 Subject: [PATCH] ctx: initialize field 'verbosity' Uninitialized field can contain a garbage and break expected logs behavior. --- src/ctx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ctx.c b/src/ctx.c index 22d416b..cbba86e 100644 --- a/src/ctx.c +++ b/src/ctx.c @@ -440,6 +440,7 @@ xmpp_ctx_t *xmpp_ctx_new(const xmpp_mem_t *mem, const xmpp_log_t *log) ctx->loop_status = XMPP_LOOP_NOTSTARTED; ctx->rand = xmpp_rand_new(ctx); ctx->timeout = EVENT_LOOP_DEFAULT_TIMEOUT; + ctx->verbosity = 0; if (ctx->rand == NULL) { xmpp_free(ctx, ctx); ctx = NULL;