test/py: avb: fix test_avb_persistent_values fail
authorIgor Opaniuk <igor.opaniuk@gmail.com>
Mon, 6 May 2019 09:07:31 +0000 (12:07 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 9 May 2019 23:52:55 +0000 (19:52 -0400)
Fix test_avb_persistent_values() pytest, which was failing because of
wrong size value provided from tee sandbox driver.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
drivers/tee/sandbox.c

index a136bc96098f7b2731da162cbb0a71cd927c8dc2..2f3355c7b77d5d04245f082facc11086463f3ad1 100644 (file)
@@ -178,7 +178,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params,
                if (!ep)
                        return TEE_ERROR_ITEM_NOT_FOUND;
 
-               value_sz = strlen(ep->data);
+               value_sz = strlen(ep->data) + 1;
                memcpy(value, ep->data, value_sz);
 
                return TEE_SUCCESS;