mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
do not accept keys without a uid. Previously this was crashing RS
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6912 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
830404a25e
commit
dda9d4eca5
@ -693,6 +693,11 @@ bool PGPHandler::getGPGDetailsFromBinaryBlock(const unsigned char *mem_block,siz
|
||||
std::cerr << "No or incomplete/invalid key in supplied pgp block." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
if(tmp_keyring->keys[0].uids == NULL)
|
||||
{
|
||||
std::cerr << "No uid in supplied key." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
key_id = PGPIdType(tmp_keyring->keys[0].key_id).toStdString() ;
|
||||
name = std::string((char *)tmp_keyring->keys[0].uids[0].user_id) ;
|
||||
|
Loading…
Reference in New Issue
Block a user