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

Re: [PATCH] pathspec: fix segfault in clear_pathspec

From
Stefan Beller <sbeller@google.com>
Date
Apr 7, 2017, 19:39 UTC
Message-ID
<CAGZ79kao8R9ANDv94oovwB0QK4V_r2VmdCuuUxoEBt_LWFm70A@mail.gmail.com>
In-Reply-To
<20170407192919.10209-1-bmwill@google.com>
On Fri, Apr 7, 2017 at 12:29 PM, Brandon Williams <bmwill@google.com> wrote:
Show 5 quoted lines
> In 'clear_pathspec()' the incorrect index parameter is used to bound an
> inner-loop which is used to free a 'struct attr_match' value field.
> Using the incorrect index parameter (in addition to being incorrect)
> occasionally causes segmentation faults when attempting to free an
> invalid pointer.  Fix this by using the correct index parameter 'i'.

This was introduced via b0db704652 (pathspec: allow querying for attributes, 2017-03-13), and it seems there was no other topics in flight since then or at the time. So the review failed to spot it and not some other weird root cause.

Thanks, Stefan

Previous: Brandon WilliamsNext: Duy Nguyen
Message 2 of 3 in “pathspec: fix segfault in clear_pathspec”
  1. pathspec: fix segfault in clear_pathspecBrandon Williams, Apr 7, 2017
  2. Stefan BellerApr 7, 2017
  3. Duy NguyenApr 10, 2017

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.