diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-07-15 17:30:39 +0200 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-07-15 17:35:48 +0200 |
commit | ed28c8304c1653a340088137966fff56bae15ad0 (patch) | |
tree | b24455c38cbf95e3786ea1279664990df3c29bf6 /src/include/ipxe/oncrpc.h | |
parent | 51d14424bfce4f36c3361cfad5f06a0c7d5ef3ea (diff) | |
download | ipxe-ed28c8304c1653a340088137966fff56bae15ad0.zip ipxe-ed28c8304c1653a340088137966fff56bae15ad0.tar.gz ipxe-ed28c8304c1653a340088137966fff56bae15ad0.tar.bz2 |
[ifmgmt] Avoid relying on global variable within ifcommon_exec()
The getopt API defines optind as a global variable. When used by the
"autoboot" command, the payload function passed to ifcommon_exec() may
result in a new iPXE script being executed; the commands therein would
then overwrite the value of optind. On returning, ifcommon_exec()
would continue processing the list of interfaces from an undefined
point.
Fix by using a local variable to hold the index within the list of
interfaces.
Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/oncrpc.h')
0 files changed, 0 insertions, 0 deletions