about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-10-16 19:10:46 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-10-16 19:10:46 +0000
commita4a4cc2f1c546915fbb9efe8e21a1189d235b18c (patch)
tree58b1867a586f694377f278774bd86f9a29faf6fc /src
parenta431f0ccec5c7d965a8fbbe3494b60bb439b6fb9 (diff)
downloadexecline-a4a4cc2f1c546915fbb9efe8e21a1189d235b18c.tar.gz
execline-a4a4cc2f1c546915fbb9efe8e21a1189d235b18c.tar.xz
execline-a4a4cc2f1c546915fbb9efe8e21a1189d235b18c.zip
bugfix: runblock -r segfaulted on too few arguments (thanks jjk)
Diffstat (limited to 'src')
-rw-r--r--src/execline/runblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/execline/runblock.c b/src/execline/runblock.c
index a654023..4e3808d 100644
--- a/src/execline/runblock.c
+++ b/src/execline/runblock.c
@@ -77,7 +77,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
 
   if (flagr)  /* put remainder envvars into v */
   {
-    if (++m == sharp) return 0 ;
+    if (++m > sharp) return 0 ;
     if (!genalloc_ready(char const *, &v, sharp - m + 2))
       strerr_diefu1sys(111, "genalloc_ready") ;
     for (; m <= sharp ; m++)