[misc]: Terminate soc_name to fix out of bounds

1. Terminate soc_name string to fix memory out of bounds
2. Fix all snprintf/strnlen warning

Change-Id: I4525c6e289a00d1509bc30ee69545d92f2f4b9cb
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
This commit is contained in:
Shunqian Zheng
2020-04-28 11:27:14 +08:00
committed by Herman Chen
parent 32689b3708
commit 9464af395b
5 changed files with 12 additions and 8 deletions

View File

@@ -585,7 +585,7 @@ MppBufferGroupImpl *mpp_buffer_get_misc_group(MppBufferMode mode, MppBufferType
AutoMutex auto_lock(MppBufferService::get_lock());
MppBufferGroupImpl *misc = MppBufferService::get_instance()->get_misc(mode, type);
if (NULL == misc) {
char tag[16];
char tag[32];
RK_S32 offset = 0;
offset += snprintf(tag + offset, sizeof(tag) - offset, "misc");