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

Re: [PATCH 7/7] determine_author_info: stop leaking name/email

From
Jeff King <peff@peff.net>
Date
Jun 23, 2014, 17:21 UTC
Message-ID
<20140623172136.GC4838@sigill.intra.peff.net>
In-Reply-To
<CABPQNSaqGaCnE7jY6yj_0m8iHpU2Y5rt9wAHW=sM_oH9r1qTzA@mail.gmail.com>
On Mon, Jun 23, 2014 at 11:33:56AM +0200, Erik Faye-Lund wrote:
> This approach has the added benefit of fixing the case where getenv
> uses a static buffer, like POSIX allows.

Good point. I knew we could invalidate the pointer if setenv() was called, but I didn't know that another getenv() could (I don't know of any such implementation offhand, but it is not too hard to handle it).

-Peff
Previous: Eric SunshineNext: Jeff King
Message 15 of 16 in “cleaning up determine_author_info”
  1. 0/7 cleaning up determine_author_infoJeff King, Jun 18, 2014
  2. 1/7 commit: provide a function to find a header in a bufferJeff King, Jun 18, 2014
  3. Eric SunshineJun 23, 2014
  4. Jeff KingJun 23, 2014
  5. 2/7 record_author_info: fix memory leak on malformed commitJeff King, Jun 18, 2014
  6. 3/7 record_author_info: use find_commit_headerJeff King, Jun 18, 2014
  7. 4/7 ident_split: store begin/end pairs on their own structJeff King, Jun 18, 2014
  8. Eric SunshineJun 23, 2014
  9. 5/7 use strbufs in date functionsJeff King, Jun 18, 2014
  10. 6/7 determine_author_info: reuse parsing functionsJeff King, Jun 18, 2014
  11. 7/7 determine_author_info: stop leaking name/emailJeff King, Jun 18, 2014
  12. Eric SunshineJun 23, 2014
  13. Erik Faye-LundJun 23, 2014
  14. Eric SunshineJun 23, 2014
  15. Jeff KingJun 23, 2014
  16. Jeff KingJun 23, 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.