When resizing DHCP options, iPXE currently calculates the length to be copied by subtracting the destination pointer from the end of buffer pointer. This works and guarantees not to write beyond the end of the buffer, but may end up reading beyond the end of the buffer. Fix by calculating the required length exactly. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
202 |
|
202 |
|
203 |
|
203 |
|
204 |
|
204 |
|
205 |
|
|
|
206 |
|
205 |
|
207 |
|
206 |
|
208 |
|
207 |
|
|
|
||
245 |
|
244 |
|
246 |
|
245 |
|
247 |
|
246 |
|
248 |
|
|
|
249 |
|
|
|
|
247 |
|
|
250 |
|
248 |
|
251 |
|
249 |
|
252 |
|
250 |
|