mirror of https://github.com/ipxe/ipxe.git
The comments for replace_string() state that a successful return status guarantees that the dynamically allocated string pointer is no longer NULL (even if it was initially NULL and the replacement string is NULL or empty). This is relied upon by readline() to guarantee that it will always return a non-NULL string if successful. The code behaviour does not currently match this comment: an empty replacement string may result in a successful return status even if the (single-byte) allocation fails. Fix up the code behaviour to match the comments, and to additionally ensure that the edit history is filled in even in the event of an allocation failure. Signed-off-by: Michael Brown <mcb30@ipxe.org> |
||
---|---|---|
.github/workflows | ||
contrib | ||
src | ||
COPYING | ||
COPYING.GPLv2 | ||
COPYING.UBDL | ||
README |
README
iPXE README File Quick start guide: cd src make For any more detailed instructions, see http://ipxe.org