g: fix dcrypto key context initialization

mempy should be using size of the object, not size of the pointer.

BRANCH=none
BUG=none
TEST=make buildall -j

Change-Id: I1ccb8ca4c313da8dad45b19375f390cfb346ac65
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/431106
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Nagendra Modadugu <ngm@google.com>
This commit is contained in:
Vadim Bendebury
2017-01-22 09:06:04 -08:00
committed by chrome-bot
parent e4f2da5004
commit 60f3d31fdd

View File

@@ -22,7 +22,7 @@ int DCRYPTO_appkey_init(enum dcrypto_appid appid, struct APPKEY_CTX *ctx)
if (appid >= ARRAY_SIZE(dcrypto_app_names))
return 0;
memset(ctx, 0, sizeof(ctx));
memset(ctx, 0, sizeof(*ctx));
if (!DCRYPTO_ladder_compute_frk2(0, ctx->key))
return 0;