forked from enlightenment/efl
elm_prefs_cc_parse.c: tok null check in advance.
This fixes coverity CID 1040003 Dereference before null check (REVERSE_INULL).
This commit is contained in:
parent
d605252bc7
commit
b5193a7ac3
|
@ -388,6 +388,7 @@ done:
|
|||
*new_p = p;
|
||||
|
||||
tok = mem_alloc(tok_end - tok_start + 2);
|
||||
if (!tok) return NULL;
|
||||
strncpy(tok, tok_start, tok_end - tok_start + 1);
|
||||
tok[tok_end - tok_start + 1] = 0;
|
||||
|
||||
|
@ -425,7 +426,7 @@ done:
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((tok) && (*tok == '('))
|
||||
else if (*tok == '(')
|
||||
{
|
||||
char *tmp;
|
||||
tmp = tok;
|
||||
|
|
Loading…
Reference in New Issue