]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: Trim output buffer size correctly for tee variables
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 21 Jul 2020 22:50:37 +0000 (01:50 +0300)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 1 Aug 2020 09:57:41 +0000 (11:57 +0200)
commitdb94dfbd525943b1bf4ecda81477cedfe70fc50e
treec7c6bd77c640659b664d267cdd130fe46b04f225
parenta2d051e7b6a8f87add1067d936bb0c805a47b0df
efi_loader: Trim output buffer size correctly for tee variables

The current code does not trim the output buffer correctly.
In fact it doesn't trim the buffer at all, since it calculates a wrong
value for it, which isn't even applied.
So let's remove the unused temporary size variable and trim the buffer
correctly.
Since we are editing efi_get_next_variable_name_int(), fix an indentation
error along the way.

Fixes: f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Remove superfluous conversion to (u8 *) for memcpy argument.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_variable_tee.c