diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 19062b36e077..27f7cd309ebc 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -608,6 +608,7 @@ prompt(void) (void)fclose(ttyfp); return (0); } + response[rsize - 1] = '\0'; match = regexec(&cre, response, 0, NULL, 0); (void)fclose(ttyfp); regfree(&cre);