]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - optee/ti-optee-os.git/commit
libutee: fix TEE_BigIntInit() memset()
authorJens Wiklander <jens.wiklander@linaro.org>
Mon, 14 Dec 2020 22:42:48 +0000 (23:42 +0100)
committerJérôme Forissier <jerome@forissier.org>
Tue, 15 Dec 2020 11:26:25 +0000 (12:26 +0100)
commite6e7781f4ba7fe73ee312f4eed640e7ba1d04752
tree356093e47f3c281fa79e1a6f709155566950a296
parent8e07702ef73910e5e7f88d257fb9090b1936bf40
libutee: fix TEE_BigIntInit() memset()

The TEE_BigIntInit() supplied length is the number of words allocated
for the bigint, including headers. Prior to this patch it seems it was
assumed that length was number of bits given the call to
TEE_BigIntSizeInU32(). With this patch correct this by removing the
TEE_BigIntSizeInU32() call.

Fixes: 062e3d01c039 ("ta: switch to to mbedtls for bignum")
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
lib/libutee/tee_api_arith_mpi.c