getlockpid(): fix potential buffer overflow

read() can read and return up to sizeof(buf) bytes,
and then buf[sizeof(buf)] is out of bounds.

Can't happen in reality, but who knows.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed