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

Re: New Defects reported by Coverity Scan for git

From
Paul Tan <pyokagan@gmail.com>
Date
Jun 17, 2015, 14:39 UTC
Message-ID
<CACRoPnRz8T3yV3=g4128oa+GtuCzdxXCa1JN7stcbP_zVKFLqw@mail.gmail.com>
In-Reply-To
<CACsJy8D5_n3+yQ=7fRFMv6XU=s3vf0hoi4-7yDyYZSByK0zKsA@mail.gmail.com>
On Wed, Jun 17, 2015 at 9:54 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 24 quoted lines
> I think Coverity caught this correctly.
>
> ** CID 1306846:  Memory - illegal accesses  (USE_AFTER_FREE)
> /builtin/pull.c: 287 in config_get_rebase()
>
>
> ________________________________________________________________________________________________________
> *** CID 1306846:  Memory - illegal accesses  (USE_AFTER_FREE)
> /builtin/pull.c: 287 in config_get_rebase()
> 281
> 282             if (curr_branch) {
> 283                     char *key = xstrfmt("branch.%s.rebase",
> curr_branch->name);
> 284
> 285                     if (!git_config_get_value(key, &value)) {
> 286                             free(key);
>>>>     CID 1306846:  Memory - illegal accesses  (USE_AFTER_FREE)
>>>>     Passing freed pointer "key" as an argument to "parse_config_rebase".
> 287                             return parse_config_rebase(key, value, 1);
> 288                     }
> 289
> 290                     free(key);
> 291             }
> 292
Ugh, thanks. ><

Regards, Paul

Previous: Duy Nguyen
Message 2 of 2 in “Fwd: New Defects reported by Coverity Scan for git”
  1. Duy NguyenJun 17, 2015
  2. Paul TanJun 17, 2015

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.