Re: [PATCH] builtin/blame: destroy initialized commit_info only
On Mon, Feb 9, 2015 at 4:33 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 12 quoted lines
> On Mon, Feb 9, 2015 at 4:28 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> Since ea02ffa3 (mailmap: simplify map_user() interface, 2013-01-05),
>> find_alignment() has been invoking commit_info_destroy() on an
>> uninitialized auto 'struct commit_info' (when METAINFO_SHOWN is not
>> set). commit_info_destroy() calls strbuf_release() for each of
>
> s/each of/each/
>
> ...despite several proof-reads (sigh).
>
>> 'commit_info' strbuf member, which randomly invokes free() on whatever
>> random stack value happens to be reside in strbuf.buf, thus leading to
>> periodic crashes.
>>
>> Reported-by: Dilyan Palauzov <dilyan.palauzov@aegee.org>
>> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>