Fwd: New Defects reported by Coverity Scan for git

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Fwd: New Defects reported by Coverity Scan for git

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:05:20

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);
quoted
quoted
    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
-- 
Duy

Re: New Defects reported by Coverity Scan for git

From: Paul Tan <hidden>
Date: 2016-06-15 23:05:21

On Wed, Jun 17, 2015 at 9:54 PM, Duy Nguyen [off-list ref] wrote:
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);
quoted
quoted
quoted
    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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help