[U-Boot] [PATCH 1/1] test/py: avb: fix test_avb_persistent_values fail

Igor Opaniuk igor.opaniuk at toradex.com
Mon May 6 09:07:31 UTC 2019


From: Igor Opaniuk <igor.opaniuk at gmail.com>

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 at gmx.de>
Signed-off-by: Igor Opaniuk <igor.opaniuk at gmail.com>
---
 drivers/tee/sandbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c
index a136bc9609..2f3355c7b7 100644
--- a/drivers/tee/sandbox.c
+++ b/drivers/tee/sandbox.c
@@ -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;
-- 
2.17.1



More information about the U-Boot mailing list