mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 05:18:03 +02:00
XkbUpdateKeyTypeVirtualMods: always initialize mask
XkbVirtualModsToReal should only fail to set mask if the server does
not support XKB, but it still made Oracle Parfait complain:
Error: Uninitialised memory
Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
Possible access to uninitialised memory referenced by variable 'mask'
at line 863 of lib/libX11/src/xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
Path in callee avoiding write at line 862
mask allocated at line 860
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
9ac6859c20
commit
6d7d08726f
1 changed files with 1 additions and 1 deletions
|
|
@ -857,7 +857,7 @@ XkbUpdateKeyTypeVirtualMods(XkbDescPtr xkb,
|
|||
XkbChangesPtr changes)
|
||||
{
|
||||
register unsigned int i;
|
||||
unsigned int mask;
|
||||
unsigned int mask = 0;
|
||||
|
||||
XkbVirtualModsToReal(xkb, type->mods.vmods, &mask);
|
||||
type->mods.mask = type->mods.real_mods | mask;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue