diff options
-rw-r--r-- | resource/csdk/connectivity/common/src/caremotehandler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resource/csdk/connectivity/common/src/caremotehandler.c b/resource/csdk/connectivity/common/src/caremotehandler.c index 1e5b7e9b1..638c04f84 100644 --- a/resource/csdk/connectivity/common/src/caremotehandler.c +++ b/resource/csdk/connectivity/common/src/caremotehandler.c @@ -261,7 +261,7 @@ CAResult_t CACloneInfo(const CAInfo_t *info, CAInfo_t *clone) // allocate token field uint8_t len = info->tokenLength; - char *temp = (char *) OICMalloc(len * sizeof(char)); + char *temp = (char *) OICCalloc(1, (len + 1) * sizeof(char)); if (!temp) { OIC_LOG(ERROR, TAG, "CACloneInfo Out of memory"); |