Re: [PATCH] wml compiler panics on some wml files

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization The Kannel Group
Message-ID <[email protected]>
Vjacheslav Chekushin wrote:

> Hi, list.
> 
> wml_compiler PANIC on wml files with some DOCTYPE definition.
> (PANIC: gwlib/octstr.c:242: octstr_create_real: Assertion `cstr != NULL' 
> failed.)
> One example is below. You can check with wml file
> with wml_tester. Attached patch fixes this problem.
> 
> <?xml version='1.0'?>
> <!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [
> <!ENTITY plainEntity "FOO entity">]>
> <wml>
>    <card id="main" name="Test">
>          <img src="/img/logo.wbmp" alt="image"/>
>             <p>
>              <a href="1.php">1</a><br/>
>              <a href="2.php">2</a><br/>
>              <a href="3.php">3</a><br/>
>              <a href="4.php">4</a><br/>
>            </p>
>    </card>
> </wml>
> 
> 
> ------------------------------------------------------------------------
> 
> --- ../gateway-1.3.2_base/gw/wml_compiler.c	Wed Apr 21 13:45:35 2004
> +++ gw/wml_compiler.c	Mon Aug  9 14:51:54 2004
> @@ -597,7 +597,7 @@
>      }
>  
>      /* Return WML Version dependent on xml ExternalID string */
> -    if (document->intSubset != NULL)
> +    if ((document->intSubset != NULL) && (document->intSubset->ExternalID != NULL))
>          externalID = octstr_create(document->intSubset->ExternalID);
>      if (externalID == NULL) {
>          (*wbxml)->wml_public_id = 0x04; /* WML 1.1 Public ID */
> 

commited to cvs. Thanks a lot.

Stipe

mailto:stolj_{at}_wapme.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.2 (Cygwin)

mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS
OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2
nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT
dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv
bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID
AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl
OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ
K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H
g2HyLAEKQIp30Q==
=aYCI
-----END PGP PUBLIC KEY BLOCK-----
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.