Commit bef3404
Check index value in xml string
Changed files (2)
Diff
@@ -171,12 +171,18 @@ public class Tag { XmlString attributes; XmlString content; + if (start < 0) {+ warn ("Negative index.");+ return new Tag.empty ();+ }+ index = start; end_tag_index = -1; d = data; if (d == null) { warn ("No data in xml string.");+ return new Tag.empty (); } while (data.get_next_char (ref index, out c)) {@@ -42,6 +42,7 @@ public class XmlString { /** Decrement the reference count and free the object when zero object are holding references to it.*/ public void unref () { if (--refcount == 0) {+ delete data; this.free (); } }