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>tags/v1.20.1
|
|
||
53 |
|
53 |
|
54 |
|
54 |
|
55 |
|
55 |
|
|
56 |
|
|
56 |
|
57 |
|
57 |
|
58 |
|
58 |
|
59 |
|
|
|
||
61 |
|
62 |
|
62 |
|
63 |
|
63 |
|
64 |
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
|
65 |
|
|
|
66 |
|
|
67 |
|
67 |
|
68 |
|
|
|
69 |
|
68 |
|
70 |
|
69 |
|
71 |
|
70 |
|