提交 1af9e570 编写于 作者: R Roberto Sassu

Ensure that function ends with \0 in lookup_lib()

上级 973caf29
......@@ -140,7 +140,7 @@ struct lib *lookup_lib(struct list_head *head, const char *lib_type,
func_name_ptr + 1, lib_type);
format_len = func_name_ptr - format;
} else {
strncpy(function, lib_type, sizeof(function) - 1);
snprintf(function, sizeof(function), "%s", lib_type);
}
if (!list_empty(head)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册