From e58bafc35fe37491bb3546299593dcc054145adb Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Fri, 5 Jan 2024 09:22:10 +0200 Subject: lib: membuff: fix readline not returning line in case of overflow If line overflows readline it will not be returned, fix this behavior, make it optional and documented properly. Signed-off-by: Ion Agorria Signed-off-by: Svyatoslav Ryhel Reviewed-by: Mattijs Korpershoek Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20240105072212.6615-6-clamor95@gmail.com Signed-off-by: Mattijs Korpershoek --- boot/bootmeth_extlinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot/bootmeth_extlinux.c') diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index aa2a4591eb..ae0ad1d53e 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -82,7 +82,7 @@ static int extlinux_fill_info(struct bootflow *bflow) log_debug("parsing bflow file size %x\n", bflow->size); membuff_init(&mb, bflow->buf, bflow->size); membuff_putraw(&mb, bflow->size, true, &data); - while (len = membuff_readline(&mb, line, sizeof(line) - 1, ' '), len) { + while (len = membuff_readline(&mb, line, sizeof(line) - 1, ' ', true), len) { char *tok, *p = line; tok = strsep(&p, " "); -- cgit v1.2.3