mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
read_ns_sys_file(): don't overrun buf
This is a classical off-by-one error. If sizeof(buf) is 512, the last element is buf[511] but not buf[512]. Note that if read() returns 0, we return 0 but buf stays uninitialized. Reported by Coverity, CID 114623. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
377763e5b1
commit
ec863205f4