The WORKAROUND_CFLAGS list is constructed based on running tests on the target compiler, and the results may not be valid for the host compiler. The only relevant workaround required for the host compiler is -Wno-stringop-truncation, which is needed to avoid a spurious compiler warning for a totally correct usage of strncpy() in util/elf2efi.c. Duplicating the workaround tests for the host compiler is messy, as is conditionally applying __attribute__((nonstring)). Fix instead by disapplying WORKAROUND_CFLAGS for the host compiler, and using memcpy() with an explicitly calculated length instead of strncpy() in util/elf2efi.c. Reported-by: Ignat Korchagin <ignat@cloudflare.com> Reported-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
454 |
|
454 |
|
455 |
|
455 |
|
456 |
|
456 |
|
457 |
|
|
|
|
457 |
|
|
458 |
|
458 |
|
459 |
|
459 |
|
460 |
|
460 |
|
|
|
||
458 |
|
458 |
|
459 |
|
459 |
|
460 |
|
460 |
|
|
461 |
|
|
461 |
|
462 |
|
462 |
|
463 |
|
463 |
|
464 |
|
|
|
||
494 |
|
495 |
|
495 |
|
496 |
|
496 |
|
497 |
|
497 |
|
|
|
|
498 |
|
|
|
499 |
|
|
|
500 |
|
|
|
501 |
|
|
498 |
|
502 |
|
499 |
|
503 |
|
500 |
|
504 |
|