mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-23 13:17:16 +00:00
[BUG] halog: correctly handle truncated last line
If last line is truncated (eg: truncated file), then halog would loop on it forever.
This commit is contained in:
parent
b3eb221e78
commit
812e7a73b2
@ -155,6 +155,7 @@ const char *fgets2(FILE *stream)
|
||||
return NULL;
|
||||
|
||||
*end = '\0';
|
||||
end = line; /* ensure we stop next time */
|
||||
return line;
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ const char *fgets2(FILE *stream)
|
||||
return NULL;
|
||||
|
||||
*end = '\0';
|
||||
end = line; /* ensure we stop next time */
|
||||
return line;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user