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

zdtm/static/fdt_shared: Fix buffer size

The TEST_STRING "Hello World!" has 13 bytes size. Therefore the 10 bytes
used for the buffer size are not sufficient.

Fix this and use sizeof() to be on the safe side.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Michael Holzheu 2017-06-30 20:31:49 +02:00 committed by Pavel Emelyanov
parent 2f886ca174
commit a01d879b62

View File

@ -62,7 +62,7 @@ static pid_t clone_child(int (*fn)(void *), int flags)
static int child2(void *_arg) static int child2(void *_arg)
{ {
char buf[10]; char buf[sizeof(TEST_STRING)];
forked(); forked();
test_waitsig(); test_waitsig();
@ -90,7 +90,7 @@ static int child3(void *_arg)
static int child(void *_arg) static int child(void *_arg)
{ {
char buf[10]; char buf[sizeof(TEST_STRING)];
pid_t pid, pid2; pid_t pid, pid2;
int status; int status;