mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
BUG/MEDIUM: map: The map parser includes blank lines.
The parser check the end line comparing to the null character. In fact, the end of line can be also '\r' or '\n'. The effect is that empty lines are loaded and indexed in maps. The bug was introduced by commit d5f624dd ("MEDIUM: sample: add the "map" converter") in 1.5-dev20. No backport is needed.
This commit is contained in:
parent
4a4e6bca60
commit
338a031e29
@ -248,7 +248,7 @@ static int map_read_entries_from_file(const char *filename,
|
|||||||
c++;
|
c++;
|
||||||
|
|
||||||
/* empty lines are ignored too */
|
/* empty lines are ignored too */
|
||||||
if (*c == '\0')
|
if (*c == '\0' || *c == '\r' || *c == '\n')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* look for the end of the key */
|
/* look for the end of the key */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user