Bugzilla – Bug 1378
UdpEchoClient::SetFill (uint8_t *fill, ...) do not set packet size attribute correctly
Last modified: 2012-02-29 22:38:41 EST
Created attachment 1343 [details] UdpEchoClient::SetFill (uint8_t *fill, ...) patch Function UdpEchoClient::SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize) do not set packet size attribute correctly. When "fillSize >= dataSize", m_size is not set. A solution is to add statement "m_size = dataSize " before statement "return" in "if (fillSize >= dataSize) { ...}" statement block. if (fillSize >= dataSize) { memcpy (m_data, fill, dataSize); m_size = dataSize; // Add this statement return; }
Created attachment 1344 [details] a test case for the patch a test case for the patch
He's right. Either apply the patch or do the same with an else{} and the return removal. Tommaso
fixed in changeset 7458a10a17d1 Thanks for providing a test case, which I added to the test suite.