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

[PATCH] git-rm: fix possible segfault

From
SNSungHyun Nam <goweol@gmail.com>
Date
Jun 9, 2006, 02:10 UTC
Message-ID
<20060609111044.451c94b1@namsh.wimo.co.kr>
Signed-off-by: SungHyun Nam <goweol@gmail.com>
---
 builtin-rm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/builtin-rm.c b/builtin-rm.c
index ef2f8b5..aeda415 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -83,6 +83,9 @@ int cmd_rm(int argc, const char **argv, 
 		}
 		die(builtin_rm_usage);
 	}
+	if (i >= argc)
+		usage(builtin_rm_usage);
+
 	pathspec = get_pathspec(prefix, argv + i);
 
 	seen = NULL;
-- 
1.4.0.rc1.gfd7e
Next: Junio C Hamano
Message 1 of 2 in “git-rm: fix possible segfault”
  1. git-rm: fix possible segfaultSungHyun Nam, Jun 9, 2006
  2. Junio C HamanoJun 9, 2006

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.