tool_parsecfg: make get_line handle lines ending on the buffer boundary

Add test 743 to verify.

Fixes #17030
Reported-by: Marius Kleidl
Closes #17031
This commit is contained in:
Daniel Stenberg 2025-04-11 17:10:37 +02:00
parent d364f1347f
commit 9f8bdd0eae
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 63 additions and 1 deletions

View file

@ -312,6 +312,8 @@ static bool get_line(FILE *input, struct dynbuf *buf, bool *error)
else if(feof(input))
return TRUE; /* all good */
}
else if(curlx_dyn_len(buf))
return TRUE; /* all good */
else
break;
}