summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-11-17 10:51:41 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-11-17 10:51:41 +0000
commit31f6502b2c865373ad4ccad71d4c302d4d799236 (patch)
treee01c7669565a1c88db08f35191ef04d11fb0ebe9 /src
parent38dc9bd762c5a153059e7fd120b20fda9918de12 (diff)
downloadexecline-31f6502b2c865373ad4ccad71d4c302d4d799236.tar.xz
bugfix: segfault in execlineb when both $@ and script are empty
Diffstat (limited to 'src')
-rw-r--r--src/execline/execlineb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/execline/execlineb.c b/src/execline/execlineb.c
index f94da6e..e93c3e9 100644
--- a/src/execline/execlineb.c
+++ b/src/execline/execlineb.c
@@ -148,6 +148,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
nc = myexlp(&sa, argv, argc, nmin, dollar0, flagpushenv == 4) ;
if (nc < 0) strerr_diefu1sys(111, "substitute positional parameters") ;
+ if (!nc) return 0 ;
flagpushenv = 0 ;
}
else if (flagpushenv)