Review Request 127833: KWallet: More Coverity fixes, and include Qt headers for endianness check.

Michael Pyne mpyne at kde.org
Sun May 8 00:10:15 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127833/
-----------------------------------------------------------

(Updated May 8, 2016, 12:10 a.m.)


Review request for KDE Frameworks.


Changes
-------

The Qt include for Q_BYTE_ORDER is already in an existing change (recently committed) so I took that out, and kept the dup(fd) but with a comment noting it's intentional.


Repository: kwallet


Description
-------

This is a collection of minor fixes:

An uninit variable usage was noted by Coverity (CID 1289177) for a CBC crypto function, though it only happens for encryption lengths that would not be hit in practice. I troubleshot this in December but forgot to make a RR, but IIRC the lengths that would cause problems are 7 bytes or less -- but it's still better to fix.
    
The other Coverity fix is to avoid a needless dup(2) of an opened socket since it's immediately turned into a FILE* object anyways (CID 1353007). This avoids a minor resource leak of a file descriptor.

Finally, some of the ciphers use Qt checks for endianness, and need to actually include the header that does this instead of relying on other parts of the code incidentally pulling in the needed #includes.


Diffs (updated)
-----

  src/runtime/kwalletd/backend/cbc.cc 4c13466 
  src/runtime/kwalletd/main.cpp 90c60d8 

Diff: https://git.reviewboard.kde.org/r/127833/diff/


Testing
-------

Everything still compiles -- I'm limited in my ability to test since I'm still using KDE4's KWallet (as the KF5 stuff seems to require polkit to actually work, which isn't possible with a homedir install like mine).


Thanks,

Michael Pyne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160508/cd085bcf/attachment.html>


More information about the Kde-frameworks-devel mailing list