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

null pointer dereference in refs/file-backend

From
Carlo Arenas <carenas@gmail.com>
Date
Jan 16, 2019, 09:18 UTC
Message-ID
<CAPUEspiz3RxwRsEJW2MwbVVEQh55Q9eA264=RPjtjkx8T-m7iw@mail.gmail.com>

while running HEAD cppcheck against git HEAD got the following error, that seem to be in the code all the way to maint:

[refs/files-backend.c:2681] -> [refs.c:1044] -> [cache.h:1075]: (error) Null pointer dereference: src

the code that uses NULL as the source OID was introduced with b0ca411051 ("files_transaction_prepare(): don't leak flags to packed transaction", 2017-11-05) and doesn't seem to be a false positive, hence why I am hoping someone else with a better understanding of it could come out with a solution

Carlo
Next: René Scharfe
Message 1 of 2 in “null pointer dereference in refs/file-backend”
  1. Carlo ArenasJan 16, 2019
  2. René ScharfeJan 16, 2019

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.