Windows text editors such as Notepad tend to use CRLF line endings, which breaks gPXE's signature detection for script images. Since scripts are usually very small, they end up falling back to being detected as valid PXE executable images (since there are no signature checks for PXE executables). Executing text files as x86 machine code tends not to work well. Fix by allowing for any isspace() character to terminate the "#!gpxe" signature, and by ensuring that CR characters get stripped during command line parsing. Suggested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>tags/v0.9.8
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
||
22 | 22 |
|
23 | 23 |
|
24 | 24 |
|
25 |
|
|
25 | 26 |
|
26 | 27 |
|
27 | 28 |
|
|
||
170 | 171 |
|
171 | 172 |
|
172 | 173 |
|
173 |
|
|
174 |
|
|
174 | 175 |
|
175 | 176 |
|
176 | 177 |
|
|
||
183 | 184 |
|
184 | 185 |
|
185 | 186 |
|
186 |
|
|
187 |
|
|
187 | 188 |
|
188 | 189 |
|
189 | 190 |
|
|
||
5 | 5 |
|
6 | 6 |
|
7 | 7 |
|
8 |
|
|
8 | 9 |
|
9 | 10 |
|
10 | 11 |
|
|
||
32 | 33 |
|
33 | 34 |
|
34 | 35 |
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 | 36 |
|
50 | 37 |
|
51 | 38 |
|
|
||
27 | 27 |
|
28 | 28 |
|
29 | 29 |
|
30 |
|
|
30 | 31 |
|
31 | 32 |
|
32 | 33 |
|
|
||
90 | 91 |
|
91 | 92 |
|
92 | 93 |
|
93 |
|
|
94 |
|
|
94 |
|
|
95 |
|
|
95 | 96 |
|
96 | 97 |
|
97 | 98 |
|
|
||
101 | 102 |
|
102 | 103 |
|
103 | 104 |
|
104 |
|
|
105 |
|
|
106 |
|
|
105 | 107 |
|
106 | 108 |
|
107 | 109 |
|
|
||
26 | 26 |
|
27 | 27 |
|
28 | 28 |
|
29 |
|
|
30 |
|
|
29 | 31 |
|