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

unchecked mallocs

From
MDMarinescu Paul dan <pauldan.marinescu@epfl.ch>
Date
Jan 8, 2010, 21:59 UTC
Message-ID
<D6F784B72498304C93A8A4691967698E8EE2C45017@REX2.intranet.epfl.ch>
In-Reply-To
<D6F784B72498304C93A8A4691967698E8EE2C45016@REX2.intranet.epfl.ch>

While checking out the git code in xdiff/xpatience.c and xdiff/xmerge.c I came across several (three) locations where the return values of xdl_malloc (#defined as malloc) is not checked. Shouldn't this be done here?

In git 1.6.6 the calls are at

xmerge.c:567 merge.c:571 xpatience.c:191

Paul
Message 1 of 1 in “unchecked mallocs”
  1. Marinescu Paul danJan 8, 2010

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.