git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Fwd: New Defects reported by Coverity Scan for git

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Mar 27, 2018, 10:38 UTC
Message-ID
<95add9fa-85f2-4c2b-4610-dc32edd78acf@jeffhostetler.com>
In-Reply-To
<CAGZ79kbAOcwaRzjuMtZ_HVsYvUr_7UAPbOcnrmPgsdE19q=PrQ@mail.gmail.com>
On 3/26/2018 7:39 PM, Stefan Beller wrote:
Show 10 quoted lines
> 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 ----------

[...] ________________________________________________________________________________________________________

Show 20 quoted lines
> *** 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

Previous: Stefan Beller
Message 2 of 2 in “Fwd: New Defects reported by Coverity Scan for git”
  1. Stefan BellerMar 26, 2018
  2. Jeff HostetlerMar 27, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.