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

[tig PATCH] add missing NULL in blame_grep

From
Jeff King <peff@peff.net>
Date
Feb 20, 2009, 03:23 UTC
Message-ID
<20090220032343.GA25022@coredump.intra.peff.net>

Commit 436674f introduced a grep_text utility function which takes a NULL-terminated list; the callsite in blame_grep forgot to put in a NULL, leading to segmentation faults.

Signed-off-by: Jeff King <peff@peff.net>
---
 tig.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tig.c b/tig.c
index 5acb398..1de732c 100644
--- a/tig.c
+++ b/tig.c
@@ -4595,6 +4595,7 @@ blame_grep(struct view *view, struct line *line)
 		commit ? commit->id : "",
 		commit && opt_author ? commit->author : "",
 		commit && opt_date ? mkdate(&commit->time) : "",
+		NULL
 	};
 
 	return grep_text(view, text);
-- 
1.6.2.rc1.242.g8d690
Next: Jonas Fonseca
Message 1 of 2 in “add missing NULL in blame_grep”
  1. add missing NULL in blame_grepJeff King, Feb 20, 2009
  2. Jonas FonsecaFeb 20, 2009

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.