forked from enlightenment/efl
elementary: Fix dereference of null return value
Summary: This fixes Coverity CID1261370. strrchr can return NULL here, so we need to check that 'p' is valid. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
8ff91702fd
commit
0da7ee96fc
|
@ -159,8 +159,8 @@ _standard_list_populate(Evas_Object *list, Elm_Icon_Lookup_Order order)
|
|||
{
|
||||
// group = "/elm/icon/standard-name/style/maybe_another_style??"
|
||||
snprintf(name, sizeof(name), "%s", group + 9);
|
||||
p = strrchr(name, '/');
|
||||
*p = '\0';
|
||||
if ((p = strrchr(name, '/')))
|
||||
*p = '\0';
|
||||
printf("Found group:%s Name:%s\n", group, name);
|
||||
|
||||
// quick hack to show only standard-compliant icons
|
||||
|
|
Loading…
Reference in New Issue