[edje_entry] Add null checking for name of anchor and item.
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
This commit is contained in:
parent
44639b2098
commit
d6456c6c58
|
@ -1,3 +1,7 @@
|
|||
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().
|
||||
|
|
1
NEWS
1
NEWS
|
@ -434,6 +434,7 @@ Fixes:
|
|||
- 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.
|
||||
|
|
|
@ -2829,8 +2829,10 @@ _edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor)
|
|||
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;
|
||||
|
@ -2874,8 +2876,10 @@ _edje_entry_item_geometry_get(Edje_Real_Part *rp, const char *item, Evas_Coord *
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue