]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[script] Accept labels on lines terminated with CRLF
authorMichael Brown <mcb30@ipxe.org>
Mon, 8 Aug 2011 15:35:30 +0000 (16:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 8 Aug 2011 15:35:30 +0000 (16:35 +0100)
commit174df77359f22f3be2169e9bb04e8018015b5e94
treeb5ef7a672c4d066ed5057620c875b40634db4ad5
parent8a86a848dc324221c39efd5853846e52a70046ed
[script] Accept labels on lines terminated with CRLF

CRLF line terminators are allowed in scripts; the carriage return is
simply interpreted as trailing whitespace and so is ignored.  This
fails on lines containing script labels, since the label-finding code
checks for a line containing only the ":" marker and the label itself
(without any trailing whitespace).

Fix by allowing a label to be terminated by either a NUL or a
whitespace character.

Reported-by: Bovey Christian <Christian.Bovey@chuv.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/image/script.c