Skip to contentSkip to conversation

builtin-reflog.c: typo ref --> argv[i], could cause segfault

PATCH In review Brandon Casey 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 builtin-reflog.c: typo ref --> argv[i], could cause segfault

---
 builtin-reflog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
builtin-reflog.c +1 -1
index f422693..5e54989 100644
@@ -394,7 +394,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
 		int recno;
 
 		if (!spec) {
-			status |= error("Not a reflog: %s", ref);
+			status |= error("Not a reflog: %s", argv[i]);
 			continue;
 		}
 
Signature · 1 line
1.5.4.rc2.1119.g6fdf-dirty
#1 lore raw
Quoted 10 lines · Brandon Casey
---
 builtin-reflog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
builtin-reflog.c +0 -0
index f422693..5e54989 100644

builtin-reflog.c static int cmd_reflog_delete(int argc, const char **argv, const char *prefix) · line 399

Quoted 7 lines
builtin-reflog.c +1 -1
@@ -394,7 +394,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
 		int recno;
 
 		if (!spec) {
-			status |= error("Not a reflog: %s", ref);
+			status |= error("Not a reflog: %s", argv[i]);
 			continue;
 		}

Bad Brandon! Looking at 'next' while everybody is asked to work on finding and fixing bugs on 'master' while -rc freeze.

Just kidding. Thanks, the code is obviously correct, and will queue.

I am not so surprised to see bugs in relatively new code that is only in 'next', especially this one that no Porcelains already use.

#2 lore raw
Quoted 2 lines · Junio C Hamano

Bad Brandon! Looking at 'next' while everybody is asked to work on finding and fixing bugs on 'master' while -rc freeze.

No more, I promise. :)

-brandon