mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-17 06:30:41 +08:00
[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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user