mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
SSH Agent: Check writeString() return value in OpenSSHKey
Validate `stream.writeString(m_certificateType)` success and set m_error on failure, consistent with other write*() calls. Prevents partial stream writes
This commit is contained in:
parent
963bbd0c17
commit
3f497f2eed
1 changed files with 4 additions and 1 deletions
|
|
@ -724,7 +724,10 @@ bool OpenSSHKey::writeCertificate(BinaryStream& stream, const bool addCertificat
|
|||
return true;
|
||||
}
|
||||
|
||||
stream.writeString(m_certificateType);
|
||||
if (!stream.writeString(m_certificateType)) {
|
||||
m_error = tr("Unexpected EOF when writing certificate");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!stream.writeString(m_rawCertificateData)) {
|
||||
m_error = tr("Unexpected EOF when writing certificate");
|
||||
|
|
|
|||
Loading…
Reference in a new issue