未验证 提交 84d8cf4d 编写于 作者: O openharmony_ci 提交者: Gitee

!1558 同步seccomp模块安全告警清除

Merge pull request !1558 from 夏不白/cherry-pick-1669282894
......@@ -86,7 +86,7 @@ static bool InstallSeccompPolicy(const struct sock_filter* filter, size_t filter
static char *GetFilterFileByName(const char *filterName)
{
size_t maxFilterNameLen = PATH_MAX - strlen(FILTER_LIB_PATH_FORMAT) + strlen("%s") - 1;
if (filterName == NULL && strlen(filterName) > maxFilterNameLen) {
if (filterName == NULL || strlen(filterName) > maxFilterNameLen) {
return NULL;
}
......@@ -158,7 +158,7 @@ bool SetSeccompPolicyWithName(const char *filterName)
{
void *handler = NULL;
char *filterLibRealPath = NULL;
struct sock_fprog prog = {0};
struct sock_fprog prog;
bool ret = false;
filterLibRealPath = GetFilterFileByName(filterName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册