From: Daniel Stenberg Date: Thu, 12 Jan 2023 13:38:21 +0000 (+0100) Subject: connect: fix access of pointer before NULL check X-Git-Tag: curl-7_88_0~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8956cd4f9a8317d894f40d7df42c730343dc7e5d;p=thirdparty%2Fcurl.git connect: fix access of pointer before NULL check Detected by Coverity CID 1518992 Closes #10284 --- diff --git a/lib/connect.c b/lib/connect.c index 663cf3aff2..bb03123746 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -677,7 +677,9 @@ evaluate: for(i = 0; i < sizeof(ctx->baller)/sizeof(ctx->baller[0]); i++) { struct eyeballer *baller = ctx->baller[i]; DEBUGF(LOG_CF(data, cf, "%s assess started=%d, result=%d", - baller->name, baller->has_started, baller->result)); + baller?baller->name:NULL, + baller?baller->has_started:0, + baller?baller->result:0)); if(baller && baller->has_started && baller->result) { result = baller->result; break;