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

Re: Use of strbuf.buf when strbuf.len == 0

From
Pierre Habouzit <madcoder@debian.org>
Date
Sep 27, 2007, 11:37 UTC
Message-ID
<20070927113718.GF10289@artemis.corp>
In-Reply-To
<20070927112204.GE10289@artemis.corp>
On Thu, Sep 27, 2007 at 11:22:04AM +0000, Pierre Habouzit wrote:
> (it's arguable > that it's a right thing to assume though)
  I find this ugly, so I've even checked if we did assume that, which is
easy now that such places all use strbuf_detach. One place seemed to,
but wasn't, so I patched it so that it's not the case anymore.
  All other places that use strbuf_detach don't use the fact that it can
return NULL to detect error cases, so we are safe.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Pierre Habouzit
Message 10 of 10 in “Use of strbuf.buf when strbuf.len == 0”
  1. Junio C HamanoSep 27, 2007
  2. Pierre HabouzitSep 27, 2007
  3. 1/2 double free in builtin-update-index.cPierre Habouzit, Sep 27, 2007
  4. 2/2 strbuf change: be sure ->buf is never ever NULL.Pierre Habouzit, Sep 27, 2007
  5. Linus TorvaldsSep 29, 2007
  6. Pierre HabouzitSep 29, 2007
  7. Pierre HabouzitSep 27, 2007
  8. 1/1 Make read_patch_file work on a strbuf.Pierre Habouzit, Sep 27, 2007
  9. 1/1 Make read_patch_file work on a strbuf.Pierre Habouzit, Sep 27, 2007
  10. Pierre HabouzitSep 27, 2007

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.