[wayland] Avoid compare to unintialised value in keyboard repeat
AcceptedPublic

Authored by davidedmundson on Fri, Sep 6, 9:52 AM.

Details

Reviewers
zzag
Group Reviewers
KWin
Summary

If we get a key event for which

if (m_xkb->shouldKeyRepeat(key) &&
waylandServer()->seat()->keyRepeatDelay() != 0) fails

m_key will be unitialised and on release we have a compare against
unitialised memory.

Won't do any harm, it'll just stop a timer that isn't running, but
valgrind complains.

0 is the value QKeyEvent uses when nativeScanCode is unknown so a safe
initial values.

Diff Detail

Repository
R108 KWin
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 16168
Build 16186: arc lint + arc unit
davidedmundson created this revision.Fri, Sep 6, 9:52 AM
Restricted Application added a project: KWin. · View Herald TranscriptFri, Sep 6, 9:52 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Fri, Sep 6, 9:52 AM
zzag accepted this revision.Fri, Sep 6, 9:56 AM
This revision is now accepted and ready to land.Fri, Sep 6, 9:56 AM