Commit 8a6c1502 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: don't write more than buffer size

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 579e55fa
......@@ -145,7 +145,7 @@ static void ns_sig_hand(int signo)
return;
write_out:
/* fprintf can't be used in a sighandler due to glibc locks */
write(STDERR_FILENO, buf, MAX(len, sizeof(buf)));
write(STDERR_FILENO, buf, MIN(len, sizeof(buf)));
}
#define STATUS_FD 255
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment