CVSROOT:        /cvs
Module name:    xenocara
Changes by:     bl...@cvs.openbsd.org   2020/08/06 08:53:33

Modified files:
        lib/libX11/modules/im/ximcp: Tag: OPENBSD_6_7 imRmAttr.c 

Log message:
Merge from upstream X.Org : Fix size calculation in `_XimAttributeToValue`

The check here guards the read below.

For `XimType_XIMStyles`, these are `num` of `CARD32` and for
`XimType_XIMHotKeyTriggers` these are `num` of `XIMTRIGGERKEY` ref[1]
which is defined as 3 x `CARD32`.  (There are data after the
`XIMTRIGGERKEY` according to the spec but they are not read by this
function and doesn't need to be checked.)

The old code here used the native datatype size instead of the wire
protocol size causing the check to always fail.

Also fix the size calculation for the header (size). It is 2 x CARD16
for both types despite the unused `CARD16` for `XimType_XIMStyles`.

This fixes a regression caused by previous commit.

from matthieu@
this is errata/6.7/018_ximcp.patch.sig

Reply via email to