]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[initrd] Allow for zero-length initrd files
authorMichael Brown <mcb30@ipxe.org>
Thu, 18 Feb 2021 01:49:23 +0000 (01:49 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 18 Feb 2021 01:49:23 +0000 (01:49 +0000)
commit8446a439b37ae0a70693899363d0ee7c24fba935
tree0c79f12a96ae33ea7db15690b5a189240b0adeb8
parent4039b54ba308757c4d3ef4845453637819be59d6
[initrd] Allow for zero-length initrd files

A zero-length initrd file will currently cause an endless loop during
reshuffling as the empty image is repeatedly swapped with itself.

Fix by terminating the inner loop before considering an image as a
candidate to be swapped with itself.

Reported-by: Pico Mitchell <pico@randomapplications.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/image/initrd.c