[Gambas-user] [Gambas Bug Tracker] Bug #896: gb.xml: Crash when ending tag not complete

bugtracker at ...3416... bugtracker at ...3416...
Wed Feb 17 01:36:11 CET 2016


http://gambaswiki.org/bugtracker/edit?object=BUG.896&from=L21haW4-

Tobias BOEGE reported a new bug.

Summary
-------

gb.xml: Crash when ending tag not complete

Type             : Bug
Priority         : Low
Gambas version   : 3.8.90 (TRUNK)
Product          : Unknown


Description
-----------

When trying to load an invalid file like this

  <tag>
  </tag

which misses a ">", into an XmlDocument, gb.xml segfaults. The gdb backtrace is this:

#0  0x00007ffff7abb118 in memchr () from /usr/lib/libc.so.6
#1  0x00007ffff63c04a4 in memchr (__n=140737354088459, __c=60, __s=0x1) at /usr/include/string.h:87
#2  parseXML (data=data at ...2861...=0x7ffff7ff4000 "<tag>\n</tag\n", lendata=lendata at ...2861...=12, nodeCount=nodeCount at ...2861...=0x7fffffffdec8) at parser.cpp:97
#3  0x00007ffff63c0dc5 in parse (data=0x7ffff7ff4000 "<tag>\n</tag\n", lendata=12, nodeCount=0x7fffffffdec8, docType=<optimized out>) at parser.cpp:36
#4  0x00007ffff63c107d in XMLDocument_SetContent (doc=doc at ...2861...=0x68f460, content=<optimized out>, len=12) at document.cpp:156
#5  0x00007ffff63c117d in XMLDocument_Open (doc=0x68f460, fileName=<optimized out>, lenFileName=<optimized out>) at document.cpp:106
#6  0x00007ffff63c334d in CDocument_open (_object=<optimized out>, _param=<optimized out>) at CDocument.cpp:157
#7  0x0000000000431282 in EXEC_native () at gbx_exec.c:1366
#8  0x0000000000431b15 in EXEC_native_check (defined=<optimized out>) at gbx_exec.c:1163
#9  0x000000000043b65b in EXEC_loop () at gbx_exec_loop.c:1159
#10 0x00000000004300e5 in EXEC_function_loop () at gbx_exec.c:931
#11 0x0000000000430a1e in EXEC_function_real () at gbx_exec.c:895
#12 0x0000000000432094 in EXEC_public_desc (class=<optimized out>, object=object at ...2861...=0x0, desc=desc at ...2861...=0x68ee78, nparam=nparam at ...2861...=0) at gbx_exec.c:1620
#13 0x0000000000404869 in main (argc=1, argv=0x7fffffffe678) at gbx.c:416

Regards,
Tobi








More information about the User mailing list