Re: wapbox core dump

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

>   Hello,
> 
>   Looked into core dump I submitted to bugs.kannel.org some
> time ago and found the reason why wapbox was coredumping.
> 
>   In gw/wml_compiler.c line 601 we search for root element. And
> if xmlDocGetRootElement(document); returns NULL we pass it to
> string_table_build() and get core dump soon afterwards.
> 
>   How to patch Kannel to avoid coredump in such case? Clearly
> we have to add:
>   if ( node == NULL ) return(-1);

commited a fix to this.

2005-10-05  Stipe Tolj  <[email protected]>
    * gw/wml_compiler.c: fixing bug #255 where we pass a NULL result from
      xmlDocGetRootElement() within parse_document() to the next functions and
      hence causing an segfault. Thanks a lot to Mindaugas Riauba <[email protected]>
      for the bug report and the fix suggestion.
      [Msg-Id: <[email protected]>]

>   And also some check for ret value in line 376 where we are calling
> parse_document().
>   Something else?

not quite sure how much sanity we need afterwards here, since parse_document() 
may return via -1 at the very beginning, when the check is done if the passed 
document pointer is NULLed, hence I do assume the calling layer handles this 
state, right?

Stipe

mailto:stolj_{at}_wapme-group.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/
-------------------------------------------------------------------
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.