summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorChunEon Park <chuneon.park@samsung.com>2015-06-18 19:51:06 +0900
committerChunEon Park <chuneon.park@samsung.com>2015-06-18 19:51:06 +0900
commitd72aa3fecbf9899884fbdb125cdc58ca93792cbb (patch)
tree2c398715ad1f974ed7ea8613d17cb8c5d3e0e019 /src/lib/eina
parentca0e51a2c649a7b21303d5fd48bad2f9e08cbb7c (diff)
eina/simple_xml_parser: don't parse the <, > in the attribute string.
The tag identifier should not be inside of the string "~". Previous logic doesn't care that scenario, the parser context can be corrupted and it will be no more useful. @fix
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_simple_xml_parser.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/eina/eina_simple_xml_parser.c b/src/lib/eina/eina_simple_xml_parser.c
index 13dd5ee7b1..d19e217a6a 100644
--- a/src/lib/eina/eina_simple_xml_parser.c
+++ b/src/lib/eina/eina_simple_xml_parser.c
@@ -136,9 +136,16 @@ _eina_simple_xml_tag_start_find(const char *itr, const char *itr_end)
136static inline const char * 136static inline const char *
137_eina_simple_xml_tag_end_find(const char *itr, const char *itr_end) 137_eina_simple_xml_tag_end_find(const char *itr, const char *itr_end)
138{ 138{
139 Eina_Bool inside_quote = EINA_FALSE;
139 for (; itr < itr_end; itr++) 140 for (; itr < itr_end; itr++)
140 if ((*itr == '>') || (*itr == '<')) /* consider < also ends a tag */ 141 {
141 return itr; 142 if (*itr == '"') inside_quote = !inside_quote;
143 if (!inside_quote)
144 {
145 if ((*itr == '>') || (*itr == '<')) /* consider < also ends a tag */
146 return itr;
147 }
148 }
142 return NULL; 149 return NULL;
143} 150}
144 151