Include the trailing 16 bytes in the challengeResponseData check

This commit is contained in:
Cameron Gutman committed 2026-10-14 01:49:44 -05:00
1 parent 2bd4b9f721
commit ee557e83c6
1 file changed
+1 -1
+1 -1
View File
@@ -287,7 +287,7 @@ NvPairingManager::pair(QString appVersion, QString pin, QSslCertificate& serverC
}
QByteArray challengeResponseData = decrypt(m_Http.getXmlStringFromHex(challengeXml, "challengeresponse"), aesKey);
if (challengeResponseData.size() < hashLength) {
if (challengeResponseData.size() < hashLength + 16) {
qCritical() << "Invalid challengeresponse at stage #2";
m_Http.openConnectionToString(m_Http.m_BaseUrlHttp, "unpair", nullptr, REQUEST_TIMEOUT_MS);
return PairState::FAILED;