Skip to content

XkbUpdateKeyTypeVirtualMods: always initialize mask

Alan Coopersmith requested to merge alanc/libx11:parfait into master

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

Merge request reports

Loading