fixed crash when trying to deserialize an empty buffer in rsrecogn

This commit is contained in:
csoler 2017-05-04 21:40:32 +02:00
parent 2f2715b240
commit e913f3689a

View File

@ -552,6 +552,9 @@ RsGxsRecognTagItem *RsRecogn::extractTag(const std::string &encoded)
std::vector<uint8_t> buffer = Radix64::decode(encoded);
pktsize = buffer.size();
if(buffer.empty())
return NULL ;
RsGxsRecognSerialiser serialiser;
RsItem *item = serialiser.deserialise(buffer.data(), &pktsize);