X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffreenet%2Fintroductionpuzzlerequester.cpp;h=88fd48307e2fd4dd2d3bd86edc78d0611f526f85;hb=c0ebc7b53a977885ebc2d3a679c586ae20c0bc4a;hp=dabe8189d756307372809013dcd39ea7a4b10cb4;hpb=278ee758050cb7772cd95946688c5b40104f4d8b;p=fms.git diff --git a/src/freenet/introductionpuzzlerequester.cpp b/src/freenet/introductionpuzzlerequester.cpp index dabe818..88fd483 100644 --- a/src/freenet/introductionpuzzlerequester.cpp +++ b/src/freenet/introductionpuzzlerequester.cpp @@ -66,10 +66,13 @@ const bool IntroductionPuzzleRequester::HandleAllData(FCPMessage &message) // receive the file data.resize(datalength); - m_fcp->ReceiveRaw(&data[0],datalength); + if(data.size()>0) + { + m_fcp->ReceiveRaw(&data[0],datalength); + } // parse file into xml and update the database - if(xml.ParseXML(std::string(data.begin(),data.end()))==true) + if(data.size()>0 && xml.ParseXML(std::string(data.begin(),data.end()))==true) { // check if last part of UUID matches first part of public key of identity who inserted it