fixed connection with qssh
This commit is contained in:
parent
2564430046
commit
87fed9fde3
3 changed files with 13 additions and 14 deletions
|
@ -138,7 +138,7 @@ QByteArray AbstractSshPacket::generateMac(const SshAbstractCryptoFacility &crypt
|
|||
quint32 seqNr) const
|
||||
{
|
||||
const quint32 seqNrBe = qToBigEndian(seqNr);
|
||||
QByteArray data(reinterpret_cast<const char *>(&seqNrBe), sizeof seqNrBe);
|
||||
QByteArray data(reinterpret_cast<const char *>(&seqNrBe), static_cast<int>(sizeof seqNrBe));
|
||||
data += QByteArray(m_data.constData(), length() + 4);
|
||||
return crypt.generateMac(data, data.size());
|
||||
}
|
||||
|
@ -150,8 +150,9 @@ quint32 AbstractSshPacket::minPacketSize() const
|
|||
|
||||
void AbstractSshPacket::setLengthField(QByteArray &data)
|
||||
{
|
||||
const quint32 length = qToBigEndian(data.size() - 4);
|
||||
data.replace(qsizetype(0), 4, reinterpret_cast<const char *>(&length), 4);
|
||||
const quint32 length = qToBigEndian<quint32>(data.size() - 4);
|
||||
data.replace(static_cast<qsizetype>(0), static_cast<qsizetype>(4),
|
||||
reinterpret_cast<const char *>(&length), static_cast<qsizetype>(4));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue