forked from enlightenment/efl
efl_canvas_vg_object: Fix dereference after null check
Coverity reports that both pname & file variables can be null here, and that we are potentially passing NULL to strcmp. Check for valid variables before passing to strcmp Fixes Coverity CID1399423, CID1399421 @fix Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8350
This commit is contained in:
parent
decfca4f23
commit
2d7678074e
|
@ -257,7 +257,7 @@ _efl_canvas_vg_object_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *p
|
|||
int pl = pname ? strlen(pname) : 0;
|
||||
int cl = file ? strlen(file) : 0;
|
||||
|
||||
if ((pl != cl) || strcmp(pname, file))
|
||||
if ((pl != cl) || (pname && file && strcmp(pname, file)))
|
||||
{
|
||||
Evas_Object_Protected_Data *obj;
|
||||
obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
||||
|
|
Loading…
Reference in New Issue