Bug 457566 - sending packets with wrong format on XIM_QUERY_EXTENSION_REPLY
Summary: sending packets with wrong format on XIM_QUERY_EXTENSION_REPLY
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: scim
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Peng Huang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-01 14:54 UTC by Akira TAGOH
Modified: 2008-12-02 00:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-02 00:48:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (698 bytes, application/octet-stream)
2008-08-01 14:58 UTC, Akira TAGOH
no flags Details
proposed patch, take 2 (739 bytes, patch)
2008-08-01 15:22 UTC, Akira TAGOH
no flags Details | Diff

Description Akira TAGOH 2008-08-01 14:54:32 UTC
Description of problem:
from XIM specification, the packet syntax for XIM_QUERY_EXTENSION is defined as:

XIM_QUERY_EXTENSION_REPLY

2    CARD16       input-method ID
2    n            byte length of extensions supported
                  by both the IM library and the IM Server.
n    LISTofEXT    list of extensions supported by
                  both the IM library and the IM Server.

also EXT is defined as:

EXT

1    CARD8        extension major-opcode
1    CARD8        extension minor-opcode
2    n            length of extension name
n    STRING8      extension name
p                 unused, p = Pad(n)

This is a dump code what SCIM sent back to the client:
D:[transport/summary] 0x3400072 <- opcode: XIM_QUERY_EXTENSION_REPLY(major: 41,
minor 0) length: 36
D:[transport/dump]  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F 0123456789ABCDEF
D:[transport/dump] --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--=----------------
D:[transport/dump] 29:00:08:00:6d:00:1c:00:80:00:30:00:16:00:58:49 )...m.....0...XI
D:[transport/dump] 4d:5f:45:58:54:5f:53:45:54:5f:45:56:45:4e:54:5f M_EXT_SET_EVENT_
D:[transport/dump] 4d:41:53:4b                                     MASK

Apparently it doesn't follow the above syntax.


Version-Release number of selected component (if applicable):
scim-1.4.7-23.fc9.x86_64

How reproducible:
always

Steps to Reproduce:
1.run X application with XMODIFIERS=@im=SCIM
2.monitor the packets on XIM protocol.
3.
  
Actual results:
the client got the wrong packets and can't use the extensions then.

Expected results:
should receives the proper reply.

Additional info:

Comment 1 Akira TAGOH 2008-08-01 14:58:25 UTC
Created attachment 313207 [details]
proposed patch

Comment 2 Akira TAGOH 2008-08-01 15:22:48 UTC
Created attachment 313208 [details]
proposed patch, take 2

tested. the received packet looks good now:

D:[transport/summary] 0x34000bb <- opcode: XIM_QUERY_EXTENSION_REPLY(major: 41,
minor 0) length: 36
D:[transport/dump]  0  1  2  3	4  5  6  7  8  9  A  B	C  D  E  F
0123456789ABCDEF
D:[transport/dump]
--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--=----------------
D:[transport/dump] 29:00:08:00:01:00:1c:00:80:30:16:00:58:49:4d:5f
)........0..XIM_
D:[transport/dump] 45:58:54:5f:53:45:54:5f:45:56:45:4e:54:5f:4d:41
EXT_SET_EVENT_MA
D:[transport/dump] 53:4b:00:00					   SK..

Comment 3 Peng Huang 2008-08-02 01:30:49 UTC
Thanks.
I have fixed it in rawhide. Please test it. 
If no problem, I will port it to fedora 9.

Comment 4 Tony Fu 2008-09-10 03:18:15 UTC
requested by Jens Petersen (#27995)

Comment 5 Jens Petersen 2008-12-02 00:48:38 UTC
Should be fixed in scim-1.4.7-24.fc9.


Note You need to log in before you can comment on or make changes to this bug.