Summary:
Even if the anchor name is null, it will be appended to "anchors".
There are many null checking for name of anchor.
So it should be checked in geometry_get functions.
Test Plan:
Test with text "<a href =abc>We can't find name in this case</a>".
This text makes break the application. Because of a space between "href" and "=".
The name of anchor will be saved as null in "anchors".
Reviewers: woohyun, tasn, cedric
CC: cedric, raster
Differential Revision: https://phab.enlightenment.org/D318
+2013-11-05 Youngbok Shin
+
+ * Edje: Add null checking for name of anchor and item in geometry get functions.
+
2013-11-03 Christophe Sadoine
* Eet: Added EET_DATA_DESCRIPTOR_ADD_MAPPING_BASIC().
- Fix size calculation of flags of signal callbacks
- Check for both Lua 5.1 and 5.2.
- Fixed memory leak in the edje map color transition.
+ - Add null checking for name of anchor and item in geometry get functions.
* Efreet:
- Fix desktop command parsing of https.
if (!en) return NULL;
EINA_LIST_FOREACH(en->anchors, l, an)
{
+ const char *n = an->name;
if (an->item) continue;
- if (!strcmp(anchor, an->name))
+ if (!n) n = "";
+ if (!strcmp(anchor, n))
return an->sel;
}
return NULL;
if (!en) return EINA_FALSE;
EINA_LIST_FOREACH(en->anchors, l, an)
{
+ const char *n = an->name;
if (an->item) continue;
- if (!strcmp(item, an->name))
+ if (!n) n = "";
+ if (!strcmp(item, n))
{
evas_textblock_cursor_format_item_geometry_get(an->start, cx, cy, cw, ch);
return EINA_TRUE;