Commit a01d879b authored by Michael Holzheu's avatar Michael Holzheu Committed by Pavel Emelyanov

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: 's avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 2f886ca1
......@@ -62,7 +62,7 @@ static pid_t clone_child(int (*fn)(void *), int flags)
static int child2(void *_arg)
{
char buf[10];
char buf[sizeof(TEST_STRING)];
forked();
test_waitsig();
......@@ -90,7 +90,7 @@ static int child3(void *_arg)
static int child(void *_arg)
{
char buf[10];
char buf[sizeof(TEST_STRING)];
pid_t pid, pid2;
int status;
......
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