]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r279779: env: Fix crash when -S string is not empty but no operand
authorjilles <jilles@FreeBSD.org>
Sun, 15 Mar 2015 11:43:51 +0000 (11:43 +0000)
committerjilles <jilles@FreeBSD.org>
Sun, 15 Mar 2015 11:43:51 +0000 (11:43 +0000)
commit06654ae5cb4a97978bdd4367a8acbe2ff3c3ab7b
treec5c58f7ca0e8b8c1057cc29eca7b7a0e1f0e0aea
parent3cc419d83408cc3c19bc1a08007fda0bbb55ca39
MFC r279779: env: Fix crash when -S string is not empty but no operand
follows.

split_spaces() set argc in main() incorrectly, which caused trouble for
getopt().

Examples:
  env -S '\c'
  env -S -i

PR: 197769
tools/regression/usr.bin/env/regress-env.rgdata
tools/regression/usr.bin/env/regress-sb.rb
usr.bin/env/envopts.c