2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

proc_parse: fix while condition in parse_pid_status

In parse_pid_status there are 13 places where we do done++, so when
"done" is 13 it means that we have matched each of those 13 places and
we are ready to stop. In next lines we are not going to find anything.

So the right condition for the while loop is (done < 13).

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2023-04-05 13:58:18 +08:00
committed by Andrei Vagin
parent 45e4a6b274
commit 94ac9ee3cc

View File

@@ -1043,7 +1043,7 @@ int parse_pid_status(pid_t pid, struct seize_task_status *ss, void *data)
if (bfdopenr(&f))
return -1;
while (done < 14) {
while (done < 13) {
str = breadline(&f);
if (str == NULL)
break;