From eabeef56681a8fe4ae1c6e46dbae9f49f029a01a Mon Sep 17 00:00:00 2001 From: MizihaxiZhao Date: Mon, 19 Jul 2021 19:46:17 +0800 Subject: [PATCH] Update enc_text.cpp the original memcpy size is not correct for str3_len --- src/untrusted/interface/enc_text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/untrusted/interface/enc_text.cpp b/src/untrusted/interface/enc_text.cpp index 1f9a838..b0f29a5 100644 --- a/src/untrusted/interface/enc_text.cpp +++ b/src/untrusted/interface/enc_text.cpp @@ -23,7 +23,7 @@ int enc_text_concatenate(char* src1, int str3_len; int len_raw_str1, len_raw_str2, len_raw_str3; - memcpy(&str3_len, dst_len, sizeof(uint8_t)); + memcpy(&str3_len, dst_len, sizeof(int)); uint8_t* str1 = new uint8_t[src1_len]; uint8_t* str2 = new uint8_t[src2_len];