diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 21:48:47 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 21:48:47 +0100 |
commit | c4341d50950224bb4e976fd1aac23dddc7d78f71 (patch) | |
tree | 9fa2f700cbe0283ffaf3d7da57238fb4f7e96e25 /sql/item_xmlfunc.cc | |
parent | 0d55ebc05ea303a9aea44d953abbc335c12c9330 (diff) | |
parent | 5dec570d7c1e2a39b67503a90d2d7905ac4dbb44 (diff) | |
download | mariadb-git-c4341d50950224bb4e976fd1aac23dddc7d78f71.tar.gz |
5.2 -> 5.3
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index faf5f345171..4c12e6528ac 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -2679,8 +2679,12 @@ int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len) node.parent= data->parent; // Set parent for the new node to old parent data->parent= numnodes; // Remember current node as new parent + DBUG_ASSERT(data->level <= MAX_LEVEL); data->pos[data->level]= numnodes; - node.level= data->level++; + if (data->level < MAX_LEVEL) + node.level= data->level++; + else + return MY_XML_ERROR; node.type= st->current_node_type; // TAG or ATTR node.beg= attr; node.end= attr + len; |