mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-23 13:15:51 -04:00
Ported branch commit 3017:
- added failure tests for fwrite. Some where missing. - added a test against the IP 1.0.0.0, which pops up on MacOS (when the peer is not connected to the internet?) - put some additional debug messages. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3018 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c366c5cc93
commit
a3a75b7aea
4 changed files with 26 additions and 8 deletions
|
@ -331,6 +331,10 @@ int pqistore::readPkt(RsItem **item_out)
|
|||
|
||||
// workout how much more to read.
|
||||
int extralen = getRsItemSize(block) - blen;
|
||||
|
||||
if(extralen+blen > maxlen)
|
||||
std::cerr << "***** ERROR: trying to read a packet of length " << extralen+blen << ", while the maximum length is " << maxlen << std::endl ;
|
||||
|
||||
if (extralen > 0)
|
||||
{
|
||||
if(extralen > blen + maxlen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue