[HOTFIX] Fix build break on 64bit arch 72/83472/2 accepted/tizen/3.0/common/20161114.110011 accepted/tizen/3.0/ivi/20161011.050558 accepted/tizen/3.0/mobile/20161015.033720 accepted/tizen/3.0/tv/20161016.005422 accepted/tizen/3.0/wearable/20161015.083618 accepted/tizen/common/20160812.140751 accepted/tizen/ivi/20160815.233255 accepted/tizen/mobile/20160815.233150 accepted/tizen/tv/20160815.233213 accepted/tizen/wearable/20160815.233236 submit/tizen/20160811.062803 submit/tizen/20160812.053402 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000004 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000004 submit/tizen_3.0_wearable/20161015.000004
authorsangwan.kwon <sangwan.kwon@samsung.com>
Thu, 11 Aug 2016 06:15:12 +0000 (15:15 +0900)
committersangwan kwon <sangwan.kwon@samsung.com>
Thu, 11 Aug 2016 06:23:03 +0000 (23:23 -0700)
[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 <sangwan.kwon@samsung.com>
srcs/decrypt_migrated_wgt.c

index 1012a35..4eae90b 100644 (file)
@@ -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);