From: Jeff Hostetler Date: Tue, 27 Mar 2018 10:38:35 GMT Subject: Re: Fwd: New Defects reported by Coverity Scan for git Message-ID: <95add9fa-85f2-4c2b-4610-dc32edd78acf@jeffhostetler.com> In-Reply-To: On 3/26/2018 7:39 PM, Stefan Beller wrote: > coverity scan failed for the last couple month (since Nov 20th) > without me noticing, I plan on running it again nightly for the > Git project. > > Anyway, here are issues that piled up (in origin/pu) since then. > > Stefan > > > ---------- Forwarded message ---------- [...] ________________________________________________________________________________________________________ > *** CID 1433539: Null pointer dereferences (FORWARD_NULL) > /t/helper/test-json-writer.c: 278 in scripted() > 272 struct json_writer jw = JSON_WRITER_INIT; > 273 int k; > 274 > 275 if (!strcmp(argv[0], "@object")) > 276 jw_object_begin(&jw); > 277 else if (!strcmp(argv[0], "@array")) >>>> CID 1433539: Null pointer dereferences (FORWARD_NULL) >>>> Passing "&jw" to "jw_array_begin", which dereferences null "jw.levels". > 278 jw_array_begin(&jw); > 279 else > 280 die("first script term must be '@object' or > '@array': '%s'", argv[0]); > 281 > 282 for (k = 1; k < argc; k++) { > 283 const char *a_k = argv[k]; > > ** CID 1433538: Null pointer dereferences (FORWARD_NULL) > The "jw.levels" field has been removed in the json-writer V4 reroll, so this isn't an issue going forward. Thanks, Jeff