[hackers] [sbase][PATCH] patch: fix bug

From: Mattias Andrée <maandree_AT_kth.se>
Date: Wed, 23 Mar 2016 14:02:50 +0100

Well this is embarrassing...
I never compiled it without -Og, it turns out
the program segfaults immediately without because
of an uninitialised variable.
---
 patch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patch.c b/patch.c
index 7017147..ee84a0f 100644
--- a/patch.c
+++ b/patch.c
_AT_@ -1727,7 +1727,7 @@ main(int argc, char *argv[])
 {
 	struct patchset patchset;
 	struct file_data patchfile_data;
-	char *p, *Dflag;
+	char *p, *Dflag = 0;
 
 	stdin_dash[0] = stdout_dash[0] = '-';
 	stdin_dash[1] = stdout_dash[1] = '\0';
-- 
2.7.3
Received on Wed Mar 23 2016 - 14:02:50 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 23 2016 - 14:12:13 CET