From 03157b1649b22dd06f0d0e1da464bee2d3a2811c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 11 Oct 2016 20:25:58 +0000 Subject: bugfix: backtick segfaulted on empty remainder (thanks jjk) --- src/execline/backtick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/execline/backtick.c b/src/execline/backtick.c index 2661983..38ab0af 100644 --- a/src/execline/backtick.c +++ b/src/execline/backtick.c @@ -71,7 +71,7 @@ int main (int argc, char const **argv, char const *const *envp) if (!stralloc_cats(&modif, def)) strerr_diefu1sys(111, "stralloc_catb") ; } } - if (argc == argc1 - 1) return 0 ; + if (argc1 == argc - 1) return 0 ; if (!stralloc_0(&modif)) strerr_diefu1sys(111, "stralloc_catb") ; { unsigned int reallen = str_len(modif.s) ; -- cgit v1.2.3