[Uim-bugs] [Bug 17076] New: Protocol error on XIM_GET_IM_VALUES_REPLY

View: New views
4 Messages — Rating Filter:   Alert me  

[Uim-bugs] [Bug 17076] New: Protocol error on XIM_GET_IM_VALUES_REPLY

by Bugzilla from bugzilla-daemon@freedesktop.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.freedesktop.org/show_bug.cgi?id=17076

           Summary: Protocol error on XIM_GET_IM_VALUES_REPLY
           Product: UIM
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: bridge: XIM
        AssignedTo: uim-bugs@...
        ReportedBy: akira@...


The protocol syntax of XIM_GET_IM_VALUES_REPLY is defined as:

2    CARD16                input-method-ID
2    n                     byte length of im-attributes returned
n    LISTofXIMATTRIBUTE    im-attributes returned

and XIMATTRIBUTE is:

2    CARD16                attribute ID
2    n                     value length
n                          value

XIMStyles is only available for IM attribute:

2    n                     number of XIMStyle list
2                          unused
n    CARD32                XIMStyle list

Following the above syntax, the packets for XIM_GET_IM_VALUES_REPLY should be:

           /* beginning of header */
0x2d       /* major-opcode */
0x00       /* minor-opcode */
0x0006     /* length */
           /* end of header */
0xhhhh     /* imid */
0x0014     /* byte length of im-attributes returned */
           /* beginning of LISTofXIMATTRIBUTE */
0x0000     /* attribute id */
0x0010     /* value length */
           /* beginning of value */
0x0003     /* number of XIMStyle list: from
input_style_input_style_tab_with_over_the_spot[] in ximim.cpp */
0x0000     /* unused */
0x00000408 /* XIMPreeditNothing | XIMStatusNothing */
0x00000404 /* XIMPreeditPosition | XIMStatusNothing */
0x00000402 /* XIMPreeditCallbacks | XIMStatusNothing */
           /* end of value */
           /* end of LISTofXIMATTRIBUTE */

However uim-xim sends out like:

           /* beginning of header */
0x2d       /* major-opcode */
0x00       /* minor-opcode */
0x0006     /* length */
           /* end of header */
0xhhhh     /* imid */
0x0010     /* byte length of im-attributes returned */
           /* beginning of LISTofXIMATTRIBUTE */
0x0000     /* attribute id */
0x000c     /* value length */
           /* beginning of value */
0x0003     /* number of XIMStyle list: from
input_style_input_style_tab_with_over_the_spot[] in ximim.cpp */
0x0000     /* unused */
0x00000408 /* XIMPreeditNothing | XIMStatusNothing */
0x00000404 /* XIMPreeditPosition | XIMStatusNothing */
0x00000402 /* XIMPreeditCallbacks | XIMStatusNothing */
           /* end of value */
           /* end of LISTofXIMATTRIBUTE */


--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
uim-bugs mailing list
uim-bugs@...
http://lists.freedesktop.org/mailman/listinfo/uim-bugs

[Uim-bugs] [Bug 17076] Protocol error on XIM_GET_IM_VALUES_REPLY

by Bugzilla from bugzilla-daemon@freedesktop.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.freedesktop.org/show_bug.cgi?id=17076


Etsushi Kato <ek.kato@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




--- Comment #1 from Etsushi Kato <ek.kato@...>  2008-08-11 20:55:02 PST ---
OK.  Should this fix the problem?

Index: ximtrans.cpp
===================================================================
--- ximtrans.cpp        (revision 5520)
+++ ximtrans.cpp        (working copy)
@@ -613,10 +613,6 @@
        rlen += 4;
     }

-    // since only one IMAttribute...
-    t->pushC16(imid);
-    t->pushC16(16); // length
-
     // XIMATTRIBUTE
     C16 nr_style;
     struct input_style *is = get_im_by_id(imid)->getInputStyles();
@@ -624,8 +620,12 @@
        ;
     }

+    // since only one IMAttribute...
+    t->pushC16(imid);
+    t->pushC16((C16)(8 + nr_style * 4));
+
     t->pushC16(0); // attribute id
-    t->pushC16((C16)(nr_style * 4)); // length
+    t->pushC16((C16)(4 + nr_style * 4)); // length

     t->pushC16(nr_style); // number
     t->pushC16(0);



P.S. how did you notice this bug? Just curious.


--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
uim-bugs mailing list
uim-bugs@...
http://lists.freedesktop.org/mailman/listinfo/uim-bugs

[Uim-bugs] [Bug 17076] Protocol error on XIM_GET_IM_VALUES_REPLY

by Bugzilla from bugzilla-daemon@freedesktop.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.freedesktop.org/show_bug.cgi?id=17076





--- Comment #2 from Akira TAGOH <akira@...>  2008-08-12 19:26:10 PST ---
Yes, that patch works. Thanks!

> P.S. how did you notice this bug? Just curious.

http://code.google.com/p/libgxim/

That strictly parses the protocol and there are no flexibility for error
recovery so far.. but anyway.


--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
uim-bugs mailing list
uim-bugs@...
http://lists.freedesktop.org/mailman/listinfo/uim-bugs

[Uim-bugs] [Bug 17076] Protocol error on XIM_GET_IM_VALUES_REPLY

by Bugzilla from bugzilla-daemon@freedesktop.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.freedesktop.org/show_bug.cgi?id=17076


Etsushi Kato <ek.kato@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Etsushi Kato <ek.kato@...>  2008-08-13 20:58:36 PST ---
Thanks.  Now Fixed on svn trunk.

> http://code.google.com/p/libgxim/

That sounds promising.


--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
uim-bugs mailing list
uim-bugs@...
http://lists.freedesktop.org/mailman/listinfo/uim-bugs