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:
csoler 2013-11-27 20:37:24 +00:00
parent 830404a25e
commit dda9d4eca5

View File

@ -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) ;