Re: Serious bug in the WBXML compiler
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | tolj.org system architecture |
| Message-ID | <[email protected]> |
Maxim Sobolev schrieb: > Hi, > > I reported reported to Mantis about 6 months ago > (http://bugs.kannel.org/view.php?id=405), but since there were no answer > I am copying it here. This issue prevents correct OTA provisioning of > Nokia phones, so that it's quite important. > > Please see the description below and patch attached. > > -Maxim > > When processing INLINE value WBXML compiler "forgets" to emit > instruction to switch codepage to 0 if necessary. This may result in > unparseable WBXML if the current codepage differs from 0. It has been > verified that both wbxml2 package and Now SMS gateway software do emit > this instruction in the same condition. > > For example: > > <?xml version="1.0"?> > <!DOCTYPE wap-provisioningdoc PUBLIC "-//WAPFORUM//DTD PROV 1.0//EN" > "http://www.wapforum.org/DTD/prov.dtd"> [^] > <wap-provisioningdoc version="1.1"> > <characteristic type="APPLICATION"> > <parm name="APPID" value="25"/> > <parm name="FROM" value="[email protected]"/> > <characteristic type="APPADDR"> > <parm name="ADDR" value="cdef.com"/> > <characteristic type="PORT"> > <parm name="PORTNBR" value="25"/> > </characteristic> > </characteristic> > </characteristic> > </wap-provisioningdoc> > > Correct byte sequence (generated by wbxml2 for example) would be: > > 00000000 03 0b 6a 00 c5 45 03 31 2e 31 00 01 c6 00 01 55 > 00000010 01 87 36 00 00 06 03 32 35 00 01 87 05 03 46 52 > ^^^^^ missed codepage switch 0 > While Kannel generates: > > 00000000 03 0b 6a 00 c5 45 03 31 2e 31 00 01 c6 00 01 55 > 00000010 01 87 36 06 03 32 35 00 01 87 05 03 46 52 4f 4d > ^^^^^ INLINE token Thanks again for being pedantic on getting the issues resolved. You're absolutely right, +1 for the patch, committed to CVS HEAD: 2008-02-02 Stipe Tolj <stolj at kannel.org> * gw/ota_compiler.c: fix bug #405, where we forget to switch codepage when no inline value is processed for WBXML compilation. Thanks go to Maxim Sobolev <sobomax at sippysoft.com> for reporting and proving patch. [Msg-Id: <[email protected]>] Thanks a lot! Appropriate your contribution. Stipe ------------------------------------------------------------------- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany tolj.org system architecture Kannel Software Foundation (KSF) http://www.tolj.org/ http://www.kannel.org/ mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org -------------------------------------------------------------------