Fix dereference null return value
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 19 Mar 2014 23:44:56 +0000 (08:44 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 19 Mar 2014 23:44:56 +0000 (08:44 +0900)
CID 1193210
CID 1193211

src/lib/edje/edje_entry.c
src/lib/edje/edje_textblock_styles.c

index 6a2fb28..536bc20 100644 (file)
@@ -1056,6 +1056,8 @@ _anchor_format_parse(const char *item)
    size_t len;
 
    start = strchr(item, '=');
+   if (!start) return NULL;
+
    start++; /* Advance after the '=' */
    /* If we can find a quote as the first non-space char,
     * our new delimiter is a quote, not a space. */
index 4093c64..d174e4d 100644 (file)
@@ -13,6 +13,8 @@ _edje_format_param_parse(char *item, char **key, char **val)
    char *p, *k, *v;
 
    p = strchr(item, '=');
+   if (!p) return;
+
    k = malloc(p - item + 1);
    strncpy(k, item, p - item);
    k[p - item] = 0;