From f327e9fca40ad1cf62ac18e052f09c65debac72b Mon Sep 17 00:00:00 2001 From: "sangwan.kwon" Date: Thu, 11 Aug 2016 15:15:12 +0900 Subject: [PATCH] [HOTFIX] Fix build break on 64bit arch [Problem] * EVP_Digest parameter type is unsigned int * size_t is differ between 32bit and 64bit [Solution] * Use unsigned int instead of size_t Change-Id: Ib398532c7148bcd9d736c7282e0b74c8042a2ede Signed-off-by: sangwan.kwon --- srcs/decrypt_migrated_wgt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srcs/decrypt_migrated_wgt.c b/srcs/decrypt_migrated_wgt.c index 1012a35..4eae90b 100644 --- a/srcs/decrypt_migrated_wgt.c +++ b/srcs/decrypt_migrated_wgt.c @@ -82,11 +82,13 @@ static int _get_old_iv(const raw_buffer_s *src, raw_buffer_s **piv) if (iv == NULL) return WAE_ERROR_MEMORY; - if (EVP_Digest(src->buf, src->size, iv->buf, &iv->size, EVP_sha1(), NULL) != 1) { + unsigned int _size; + if (EVP_Digest(src->buf, src->size, iv->buf, &_size, EVP_sha1(), NULL) != 1) { buffer_destroy(iv); return WAE_ERROR_CRYPTO; } + iv->size = _size; *piv = iv; WAE_SLOGD("get old iv of length: %d", iv->size); -- 2.7.4