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:
Chris Michael 2015-01-12 12:04:19 -05:00
parent 8ff91702fd
commit 0da7ee96fc
1 changed files with 2 additions and 2 deletions

View File

@ -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