1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-08 12:05:49 +00:00

Build with QT_NO_CAST_FROM_BYTEARRAY & QT_NO_CAST_TO_ASCII

This commit is contained in:
Friedrich W. H. Kossebau 2019-03-01 05:48:33 +01:00
parent 63d6314b1b
commit ef6491a5c9
2 changed files with 4 additions and 2 deletions

View File

@ -60,6 +60,8 @@ add_definitions(
-DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_DISABLE_DEPRECATED_BEFORE=0x050600
-DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_OPERATOR_PLUS
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_STRICT_ITERATORS -DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_SIGNALS_SLOTS_KEYWORDS

View File

@ -221,10 +221,10 @@ bool PendingRfbClient::vncAuthCheckPassword(const QByteArray& password, const QB
bzero(passwd, MAXPWLEN); bzero(passwd, MAXPWLEN);
if (!password.isEmpty()) { if (!password.isEmpty()) {
strncpy(passwd, password, strncpy(passwd, password.constData(),
(MAXPWLEN <= password.size()) ? MAXPWLEN : password.size()); (MAXPWLEN <= password.size()) ? MAXPWLEN : password.size());
} }
rfbEncryptBytes(challenge, passwd); rfbEncryptBytes(challenge, passwd);
return memcmp(challenge, encryptedPassword, encryptedPassword.size()) == 0; return memcmp(challenge, encryptedPassword.constData(), encryptedPassword.size()) == 0;
} }