[mpp_mem]: use snprintf to avoid NULL pointer

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@525 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-01-14 04:38:12 +00:00
parent 1975d15c8d
commit 1e60d55e70

View File

@@ -82,7 +82,7 @@ void *mpp_osal_malloc(const char *tag, size_t size)
list_add_tail(&node->list, &mem_list);
node->ptr = ptr;
node->size = size;
strncpy(node->tag, tag, sizeof(node->tag));
snprintf(node->tag, sizeof(node->tag), "%s", tag);
}
return ptr;