diff -Nru libxmlbird-1.2.10/debian/changelog libxmlbird-1.2.11/debian/changelog --- libxmlbird-1.2.10/debian/changelog 2019-09-29 06:16:23.000000000 +0000 +++ libxmlbird-1.2.11/debian/changelog 2019-12-02 10:45:30.000000000 +0000 @@ -1,3 +1,11 @@ +libxmlbird (1.2.11-1) unstable; urgency=medium + + * New upstream release + * debian/control + - set Standards-Version: 4.4.1 + + -- Hideki Yamane Mon, 02 Dec 2019 19:45:30 +0900 + libxmlbird (1.2.10-2) unstable; urgency=medium * debian/control diff -Nru libxmlbird-1.2.10/debian/control libxmlbird-1.2.11/debian/control --- libxmlbird-1.2.10/debian/control 2019-09-29 06:16:23.000000000 +0000 +++ libxmlbird-1.2.11/debian/control 2019-12-02 10:45:30.000000000 +0000 @@ -7,7 +7,7 @@ python3-doit (>= 0.30.3), libglib2.0-dev, python3-pkg-resources -Standards-Version: 4.4.0 +Standards-Version: 4.4.1 Section: libs Homepage: https://birdfont.org/xmlbird.php Vcs-Git: https://salsa.debian.org/fonts-team/libxmlbird.git diff -Nru libxmlbird-1.2.10/libxmlbird/XmlElement.vala libxmlbird-1.2.11/libxmlbird/XmlElement.vala --- libxmlbird-1.2.10/libxmlbird/XmlElement.vala 2018-10-14 14:59:17.000000000 +0000 +++ libxmlbird-1.2.11/libxmlbird/XmlElement.vala 2019-11-30 20:39:01.000000000 +0000 @@ -38,10 +38,7 @@ attributes = parse_attributes (tag); leaf = children == null; - - if (leaf) { - content = tag.get_content (); - } + content = tag.get_content (); } internal XmlElement.attribute (Attribute attribute) { @@ -131,7 +128,7 @@ } public class Iterator : GLib.Object { - int index = 0; + int index = -1; Elements? xml_elements; internal Iterator (Elements? xml_elements) { @@ -144,6 +141,8 @@ } Elements e = (!) xml_elements; + index++; + return index < e.size; } @@ -154,8 +153,13 @@ } Elements e = (!) xml_elements; + + if (unlikely (index >= e.size || index < 0)) { + XmlParser.warning (@"Element index out of bounds ($index >= $(e.size))."); + return new XmlElement.empty (); + } + XmlElement element = e.get_element (index); - index++; return element; } } diff -Nru libxmlbird-1.2.10/libxmlbird/XmlString.vala libxmlbird-1.2.11/libxmlbird/XmlString.vala --- libxmlbird-1.2.10/libxmlbird/XmlString.vala 2018-10-14 14:59:17.000000000 +0000 +++ libxmlbird-1.2.11/libxmlbird/XmlString.vala 2019-11-30 20:39:01.000000000 +0000 @@ -16,7 +16,7 @@ /** * Representation of a string in the XmlParser. This class adds reference - * counting and copies a pointer to string instead of the data. It is + * counting and copies a pointer to the string instead of the data. It is * faster if the string is big. */ internal class XmlString : GLib.Object { diff -Nru libxmlbird-1.2.10/README.md libxmlbird-1.2.11/README.md --- libxmlbird-1.2.10/README.md 2018-10-14 14:59:17.000000000 +0000 +++ libxmlbird-1.2.11/README.md 2019-11-30 20:39:01.000000000 +0000 @@ -1,6 +1,6 @@ ![xmlbird logo][xmlbird] -# XML Bird - XML parser +# XML Bird – XML parser XML Bird is an XML parser for programs written in Vala or C. diff -Nru libxmlbird-1.2.10/scripts/version.py libxmlbird-1.2.11/scripts/version.py --- libxmlbird-1.2.10/scripts/version.py 2018-10-14 14:59:17.000000000 +0000 +++ libxmlbird-1.2.11/scripts/version.py 2019-11-30 20:39:01.000000000 +0000 @@ -13,7 +13,7 @@ Lesser General Public License for more details. """ -XMLBIRD_VERSION = '1.2.10' +XMLBIRD_VERSION = '1.2.11' LIBXMLBIRD_SO_VERSION_MAJOR = '1' LIBXMLBIRD_SO_VERSION_MINOR = '0' LIBXMLBIRD_SO_VERSION = LIBXMLBIRD_SO_VERSION_MAJOR; diff -Nru libxmlbird-1.2.10/.travis.yml libxmlbird-1.2.11/.travis.yml --- libxmlbird-1.2.10/.travis.yml 2018-10-14 14:59:17.000000000 +0000 +++ libxmlbird-1.2.11/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -language: c -compiler: gcc -before_install: - - sudo add-apt-repository ppa:vala-team/ppa -y - - sudo apt-get update -qq - - sudo apt-get install -qq libglib2.0-dev libgee-dev valac-0.22 python3 -script: - - python3 ./configure - - python3 ./build.py - - python3 ./test.py