MINOR: server: Be more strict when reading the version of a server-state file
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Feb 2021 15:24:10 +0000 (16:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Feb 2021 09:02:39 +0000 (10:02 +0100)
commit8a14b73ecf992e535301972e0b7d9e7f14d1eb4c
tree804998ebccc86287408610e44557ae9ea5237ef5
parent8b4b6a0d63c5b95d51c9502e38a0ef04f3445535
MINOR: server: Be more strict when reading the version of a server-state file

Now, we read a full line and expects to found an integer only on it. And if
the line is empty or truncated, an error is returned. If the version is not
valid, an error is also returned. This way, the first line is no longer
partially read.
src/server.c