summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--argv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/argv.c b/argv.c
index 01dba107..77864950 100644
--- a/argv.c
+++ b/argv.c
@@ -294,6 +294,10 @@ args(struct mdoc *mdoc, int line,
if ( ! mdoc_iscdelim(buf[i]))
break;
i++;
+ /* There must be at least one space... */
+ if (0 == buf[i] || ! isspace((int)buf[i]))
+ break;
+ i++;
while (buf[i] && isspace((int)buf[i]))
i++;
}