Bug 457566

Summary: sending packets with wrong format on XIM_QUERY_EXTENSION_REPLY
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: scimAssignee: Peng Huang <phuang>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: i18n-bugs, petersen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-02 00:48:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch
none
proposed patch, take 2 none

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.