mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
added test over signature size to avoid possible memory corruption (Anonymous source)
This commit is contained in:
parent
116e7422b9
commit
f3aed813af
@ -991,6 +991,11 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic)
|
||||
#endif
|
||||
|
||||
/* copy data into signature */
|
||||
if(sigoutl < signature->length)
|
||||
{
|
||||
diagnostic = RS_SSL_HANDSHAKE_DIAGNOSTIC_MALLOC_ERROR ;
|
||||
goto err;
|
||||
}
|
||||
sigoutl = signature->length;
|
||||
memmove(buf_sigout, signature->data, sigoutl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user