Bugzilla – Bug 1261
Packet::CopyData ( *buffer, size) return a bad value sometimes when size == Packet::GetSize ()
Last modified: 2011-09-10 02:18:31 EDT
In my test case I have a packet P filled with valid data (not zero filled) AND : P->GetSize () return 14 then P->CopyData (buf, 14) return 0 ? So my patch is here : diff -r e52db23c9c8b src/network/model/buffer.cc --- a/src/network/model/buffer.cc Thu Sep 08 18:24:47 2011 -0700 +++ b/src/network/model/buffer.cc Fri Sep 09 17:34:22 2011 +0200 @@ -777,6 +777,10 @@ memcpy (buffer, (const char*)(m_data->m_data + m_zeroAreaStart), tmpsize); } } + else + { + return tmpsize; + } } return originalSize - size; }
This is a duplicate of bug 1001. It would be helpful if you could provide a testcase, so we can test the original patch *** This bug has been marked as a duplicate of bug 1001 ***