diff options
author | jmallett <jmallett@FreeBSD.org> | 2006-01-01 22:59:54 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2006-01-01 22:59:54 +0000 |
commit | 2c46267f6c677b52e9467a09f2108ef8cf98443e (patch) | |
tree | 5e6bd079245f29d315849ca764efb29034c3d510 /usr.bin/xargs | |
parent | f3a9678034c9fbe9e6a783d76cc6ac69412e8e64 (diff) | |
download | FreeBSD-src-2c46267f6c677b52e9467a09f2108ef8cf98443e.zip FreeBSD-src-2c46267f6c677b52e9467a09f2108ef8cf98443e.tar.gz |
NUL terminate buffer from fgetln(3). From fgsch@OpenBSD.
Diffstat (limited to 'usr.bin/xargs')
-rw-r--r-- | usr.bin/xargs/xargs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 19062b3..27f7cd3 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); |