mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-03 13:33:26 +00:00
fix the bug about wrong size value when calling core_calloc
This commit is contained in:
@@ -121,7 +121,7 @@ typedef struct _tlv_int32_t {
|
||||
TLV_CLEAR_DATA(__dST); \
|
||||
(__dST)->presence = (__sRC)->presence; \
|
||||
(__dST)->len = (__sRC)->len; \
|
||||
(__dST)->data = core_calloc(1, sizeof((__dST)->len)); \
|
||||
(__dST)->data = core_calloc((__dST)->len, sizeof(c_uint8_t)); \
|
||||
memcpy((__dST)->data, (__sRC)->data, (__dST)->len); \
|
||||
} while(0)
|
||||
typedef struct _tlv_octet_t {
|
||||
|
||||
@@ -24,7 +24,7 @@ extern "C" {
|
||||
d_assert((__dST),, "Null param") \
|
||||
NAS_CLEAR_DATA(__dST); \
|
||||
(__dST)->length = (__sRC)->length; \
|
||||
(__dST)->buffer = core_calloc(1, sizeof((__dST)->length)); \
|
||||
(__dST)->buffer = core_calloc((__dST)->length, sizeof(c_uint8_t)); \
|
||||
memcpy((__dST)->buffer, (__sRC)->buffer, (__dST)->length); \
|
||||
} while(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user