All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] setup_revisions(): do not access outside argv
@ 2009-05-20  8:08 Nguyễn Thái Ngọc Duy
  2009-05-20  8:15 ` Johannes Sixt
  0 siblings, 1 reply; 16+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2009-05-20  8:08 UTC (permalink / raw)
  To: git, Junio C Hamano; +Cc: Nguyễn Thái Ngọc Duy


Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 revision.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/revision.c b/revision.c
index 18b7ebb..be1e307 100644
--- a/revision.c
+++ b/revision.c
@@ -1241,9 +1241,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 		if (strcmp(arg, "--"))
 			continue;
 		argv[i] = NULL;
-		argc = i;
-		if (argv[i + 1])
+		if (i + 1 < argc && argv[i + 1])
 			revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
+		argc = i;
 		seen_dashdash = 1;
 		break;
 	}
-- 
test

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-06-02 13:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  8:08 [PATCH] setup_revisions(): do not access outside argv Nguyễn Thái Ngọc Duy
2009-05-20  8:15 ` Johannes Sixt
2009-05-20  8:23   ` Nguyen Thai Ngoc Duy
2009-05-21  1:58     ` Junio C Hamano
2009-05-21  2:38       ` Miles Bader
2009-05-21  2:41       ` Nguyen Thai Ngoc Duy
2009-05-21  4:18       ` Jeff King
2009-05-21 18:02         ` Thomas Jarosch
2009-05-22  7:56           ` Jeff King
2009-05-22  8:02             ` Jeff King
2009-05-22 14:23               ` Thomas Jarosch
2009-05-22 15:33               ` Brandon Casey
2009-05-22 15:34                 ` Jeff King
2009-05-25 10:46                   ` [PATCH] convert bare readlink to strbuf_readlink Jeff King
2009-05-25 22:23                     ` Junio C Hamano
     [not found]               ` <20090602195605.6117@nanako3.lavabit.com>
2009-06-02 13:57                 ` [PATCH] setup_revisions(): do not access outside argv Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.