[PATCH] Bug in wml_compiler.c (wml file without DTD)

Vjacheslav Chekushin <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization LMT
Message-ID <[email protected]>
Hi, list.

Following simple wml documents causes segmentation fault in wapbox
(because it has no DTD section)
(tested system: Linux 2.4.18 + libxml2 2.4.19)

<?xml version="1.0" encoding="utf-8"?><wml><card id="2"><p>Test</p></card></wml>

Patch :

--- ../gateway_base/gw/wml_compiler.c   Thu Oct  9 15:04:18 2003
+++ gw/wml_compiler.c   Tue Oct 21 14:45:49 2003
@@ -540,6 +513,7 @@
      }

      /* Return WML Version dependent on xml ExternalID string */
+    if (document->intSubset != NULL)
      externalID = octstr_create(document->intSubset->ExternalID);
      if (externalID == NULL) {
          (*wbxml)->wml_public_id = 0x04; /* WML 1.1 Public ID */

-- 
Vjacheslav Chekushin                                mailto:[email protected]
Latvian Mobile Phone Company                        http://www.lmt.lv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.