vzlist: fix a segfault when using --json

If the list of CTs is long enough, vzlist segfaults.

This was caused by p_buf overrun in PRINT_STR_FIELD, which is
checked for in print_one_ve() which is never called in json mode.

Fix PRINT_STR_FIELD to not print to p_buf in json case.

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