[hackers] [sbase] [PATCH] find: Fix unterminated array

From: Wolfgang Corcoran-Mathe <first.lord.of.teal_AT_gmail.com>
Date: Sun, 14 Jun 2015 01:42:18 -0400

This caused a segfault with semicolon-terminated -exec primaries.
---
 find.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/find.c b/find.c
index dcefca5..dedf5a1 100644
--- a/find.c
+++ b/find.c
_AT_@ -607,6 +607,7 @@ get_exec_arg(char *argv[], union extra *extra)
 		for (arg = argv, braces = e->u.s.braces; *arg; arg++)
 			if (!strcmp(*arg, "{}"))
 				*braces++ = arg;
+		*braces = NULL;
 	}
 	gflags.print = 0;
 	return arg;
-- 
2.3.5
Received on Sun Jun 14 2015 - 07:42:18 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:37:08 CEST