<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6810</bug_id>
          
          <creation_ts>2009-04-14 17:01:54 +0000</creation_ts>
          <short_desc>Crash on unclosed tag</short_desc>
          <delta_ts>2015-06-20 16:35:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Amaya</product>
          <component>(X)HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Magnus Henoch">magnus.henoch+w3bugzilla</reporter>
          <assigned_to name="lcarcone">carcone</assigned_to>
          <cc>carcone</cc>
    
    <cc>emilien.kia</cc>
    
    <cc>fred.wang</cc>
    
    <cc>Irene.Vatton</cc>
    
    <cc>vincent.quint</cc>
          
          <qa_contact name="lcarcone">carcone</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>24720</commentid>
    <comment_count>0</comment_count>
      <attachid>685</attachid>
    <who name="Magnus Henoch">magnus.henoch+w3bugzilla</who>
    <bug_when>2009-04-14 17:01:54 +0000</bug_when>
    <thetext>Created attachment 685
Minimized test case

When I try to load an invalid XHTML file, that uses &lt;br&gt; instead of &lt;br/&gt;, Amaya (compiled today from CVS) segfaults while trying to report the error:

Program received signal SIGSEGV, Segmentation fault.
0x0816f62f in XmlParseError (type=errorNotWellFormed, msg=0xb7f99a14 &quot;mismatched tag&quot;, line=4) at ../../amaya/Xml2thot.c:599
599                   val = (unsigned char)(c[pos]);
(gdb) bt
#0  0x0816f62f in XmlParseError (type=errorNotWellFormed, msg=0xb7f99a14 &quot;mismatched tag&quot;, line=4) at ../../amaya/Xml2thot.c:599
#1  0x0816fbee in XmlParse (infile=0xa94c280, charset=UTF_8, xmlDec=0xbfffadcb, xmlDoctype=0xbfffadca) at ../../amaya/Xml2thot.c:5929
#2  0x081757df in StartXmlParser (doc=1, fileName=0xa953298 &quot;/home/magnus/.amaya/1/unclosed-br.xml&quot;, documentName=0x9d61870 &quot;unclosed-br.xml&quot;, documentDirectory=0x9d62838 &quot;/home/magnus/.amaya/1&quot;, pathURL=0xa952c48 &quot;/tmp/unclosed-br.xml&quot;, withDec=true, withDoctype=false, 
    useMath=false, externalDoc=false) at ../../amaya/Xml2thot.c:6089
#3  0x081480bf in LoadDocument (doc=1, pathname=0xa952c48 &quot;/tmp/unclosed-br.xml&quot;, form_data=0x0, initial_url=0x9d5a6a0 &quot;/tmp/unclosed-br.xml&quot;, method=8, tempfile=0xa952f70 &quot;&quot;, documentname=0x9d61870 &quot;unclosed-br.xml&quot;, http_headers=0x0, history=false, inNewWindow=0xbfffbb57, 
    realdocname=0x0) at ../../amaya/init.c:3878
#4  0x0814842c in GetAmayaDoc_callback (newdoc=1, status=0, urlName=0x9d621e8 &quot;/tmp/unclosed-br.xml&quot;, outputfile=0x9d61ec0 &quot;&quot;, proxyName=0x0, http_headers=0x0, context=0x9d59a40) at ../../amaya/init.c:4811
#5  0x0814972a in GetAmayaDoc (urlname=0xbfffc648 &quot;/tmp/unclosed-br.xml&quot;, form_data=0x0, doc=0, baseDoc=0, method=8, history=false, cbf=0, ctx_cbf=0x0) at ../../amaya/init.c:5331
#6  0x08149c31 in CallbackDialogue (ref=37310, typedata=1, data=0x1 &lt;Address 0x1 out of bounds&gt;) at ../../amaya/init.c:5610
#7  0x0814bc4f in OpenNewDocFromArgv (url=0x99c2738 &quot;/tmp/unclosed-br.xml&quot;) at ../../amaya/init.c:7230
#8  0x0814e094 in InitAmaya (event=0xbfffce04) at ../../amaya/init.c:7138
#9  0x082f68d8 in CallAction (notifyEvent=0xbfffce04, event=TteInit, pre=false, type=0, element=0x0, schStruct=0x0, attr=false) at ../../thotlib/dialogue/callback.c:174
#10 0x082f6b7b in CallEventType (notifyEvent=0xbfffce04, pre=false) at ../../thotlib/dialogue/callback.c:335
#11 0x0830695d in TtaMainLoop () at ../../thotlib/dialogue/interface.c:174
#12 0x080d959c in amaya_main (argc=2, argv=0x99c2668) at EDITORAPP.c:1667
#13 0x082a2afb in AmayaApp::OnIdle (this=0x996f538, event=@0xbfffef18) at ../../thotlib/base/AmayaApp.cpp:463
#14 0xb744aaf1 in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&amp;), wxEvent&amp;) const () from /usr/lib/libwx_baseu-2.8.so.0
#15 0xb74e9d2a in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;) () from /usr/lib/libwx_baseu-2.8.so.0
#16 0xb74eaf44 in wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*) () from /usr/lib/libwx_baseu-2.8.so.0
#17 0xb74eb04b in wxEvtHandler::ProcessEvent(wxEvent&amp;) () from /usr/lib/libwx_baseu-2.8.so.0
#18 0xb77bd8d2 in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#19 0xb770c8f3 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#20 0xb68e6a71 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb68e89a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0xb68ec063 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0xb68ec582 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#24 0xb6ce2239 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#25 0xb77264f5 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#26 0xb77bd6be in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#27 0xb77bd291 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#28 0xb74846ba in wxEntry(int&amp;, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#29 0xb74848b7 in wxEntry(int&amp;, char**) () from /usr/lib/libwx_baseu-2.8.so.0
#30 0x082a488b in main (argc=Cannot access memory at address 0x4
) at ../../thotlib/base/AmayaApp.cpp:51</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24755</commentid>
    <comment_count>1</comment_count>
    <who name="Vatton">Irene.Vatton</who>
    <bug_when>2009-04-16 07:25:05 +0000</bug_when>
    <thetext>A test was added to prevent the crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121274</commentid>
    <comment_count>2</comment_count>
    <who name="Jackie">jackiewindsor09</who>
    <bug_when>2015-06-20 16:34:13 +0000</bug_when>
    <thetext>Please make my changes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121354</commentid>
    <comment_count>3</comment_count>
    <who name="Jackie">jackiewindsor09</who>
    <bug_when>2015-06-20 16:35:03 +0000</bug_when>
    <thetext>Please make my changes</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>685</attachid>
            <date>2009-04-14 17:01:54 +0000</date>
            <delta_ts>2009-04-14 17:01:54 +0000</delta_ts>
            <desc>Minimized test case</desc>
            <filename>unclosed-br.xml</filename>
            <type>application/xml</type>
            <size>97</size>
            <attacher name="Magnus Henoch">magnus.henoch+w3bugzilla</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPGh0bWwgeG1sbnM9Imh0dHA6
Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPgogPGJyPgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>