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

Re: [PATCH 1/2] checkout_entry(): use the strbuf throughout the function

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 13, 2014, 11:22 UTC
Message-ID
<CACsJy8AG5T4sA6j0AGtkX2uhVNDvppT=tnNrQNuZ1rhHKArP0w@mail.gmail.com>
In-Reply-To
<1394702348-6433-2-git-send-email-mhagger@alum.mit.edu>
On Thu, Mar 13, 2014 at 4:19 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
> There is no need to break out the "buf" and "len" members into
> separate temporary variables.  Rename path_buf to path and use
> path.buf and path.len directly.  This makes it easier to reason about
> the data flow in the function.

I wanted to keep changes to minimum when I did that. But I guess it has its downside as you found out.

-- 
Duy
Previous: Michael HaggertyNext: Michael Haggerty
Message 3 of 6 in “Fix possible buffer overflow in remove_subtree()”
  1. 0/2 Fix possible buffer overflow in remove_subtree()Michael Haggerty, Mar 13, 2014
  2. 1/2 checkout_entry(): use the strbuf throughout the functionMichael Haggerty, Mar 13, 2014
  3. Duy NguyenMar 13, 2014
  4. 2/2 entry.c: fix possible buffer overflow in remove_subtree()Michael Haggerty, Mar 13, 2014
  5. Duy NguyenMar 13, 2014
  6. Jeff KingMar 13, 2014

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.