diff --git a/src/Application_X11.cpp b/src/Application_X11.cpp index 8188b11..12a4ad5 100644 --- a/src/Application_X11.cpp +++ b/src/Application_X11.cpp @@ -35,7 +35,7 @@ bool KeepassApplication::x11EventFilter(XEvent* event){ autoTypeGlobal->maskAltGr() | autoTypeGlobal->maskMeta(); } - if (event->type==KeyPress && autoType->getShortcut().key!=0u && + if (event->type==KeyPress && autoType->getShortcut().key!=0 && event->xkey.keycode == XKeysymToKeycode(event->xkey.display,HelperX11::getKeysym(autoType->getShortcut().key)) && (event->xkey.state&remove_invalid) == HelperX11::getShortcutModifierMask(autoType->getShortcut()) && focusWidget()==NULL) diff --git a/src/crypto/arcfour.cpp b/src/crypto/arcfour.cpp index 7425446..b8e207b 100644 --- a/src/crypto/arcfour.cpp +++ b/src/crypto/arcfour.cpp @@ -18,12 +18,12 @@ #include "arcfour.h" -void CArcFour::setKey(quint8* key, int length){ +void CArcFour::setKey(quint8* key, uint length){ RawKey = key; RawKeyLength = length; } -void CArcFour::encrypt(const quint8* src, quint8* dst, int length){ +void CArcFour::encrypt(const quint8* src, quint8* dst, uint length){ quint8 S[256]; quint32 w; diff --git a/src/crypto/arcfour.h b/src/crypto/arcfour.h index 46a0b0d..382e845 100644 --- a/src/crypto/arcfour.h +++ b/src/crypto/arcfour.h @@ -21,13 +21,13 @@ class CArcFour{ public: - void encrypt(const quint8* src, quint8* dst, int length); - inline void decrypt(const quint8* src, quint8* dst, int length){encrypt(src,dst,length);} //just for readability - void setKey(quint8* key, int length); + void encrypt(const quint8* src, quint8* dst, uint length); + inline void decrypt(const quint8* src, quint8* dst, uint length){encrypt(src,dst,length);} //just for readability + void setKey(quint8* key, uint length); private: quint8* RawKey; - int RawKeyLength; + uint RawKeyLength; }; #endif diff --git a/src/crypto/yarrow.cpp b/src/crypto/yarrow.cpp index 114e9c0..5f9c534 100644 --- a/src/crypto/yarrow.cpp +++ b/src/crypto/yarrow.cpp @@ -425,7 +425,7 @@ void randomize(void* buffer, unsigned int length){ void strongRandomize(void* buffer, unsigned int length){ Q_ASSERT(yarrow256_is_seeded(&StrongCtx)); - for(int i=0; i(autoType); - int mod = 0; + uint mod = 0; if (s.ctrl) mod |= ControlMask; if (s.shift) mod |= ShiftMask; if (s.alt) mod |= autoTypeGlobal->maskAlt(); diff --git a/src/lib/HelperX11.h b/src/lib/HelperX11.h index 489771c..b53884b 100644 --- a/src/lib/HelperX11.h +++ b/src/lib/HelperX11.h @@ -34,7 +34,7 @@ class HelperX11{ public: static KeySym getKeysym(const QChar& c); #ifdef GLOBAL_AUTOTYPE - static int getShortcutModifierMask(const Shortcut& s); + static uint getShortcutModifierMask(const Shortcut& s); #endif static unsigned int keyboardModifiers(Display* d); diff --git a/src/lib/SecString.cpp b/src/lib/SecString.cpp index 3436e4a..6afff67 100644 --- a/src/lib/SecString.cpp +++ b/src/lib/SecString.cpp @@ -18,8 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -using namespace std; CArcFour SecString::RC4; +quint8* SecString::sessionkey; SecString::operator QString(){ return string(); @@ -88,17 +88,21 @@ void SecString::overwrite(QString& str){ if(str.length()==0) return; - for(int i=0; i