Bug 2781 - TcpRxBuffer::ClearSackList Fails when the last element is erased
TcpRxBuffer::ClearSackList Fails when the last element is erased
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: tcp
ns-3-dev
All All
: P3 critical
Assigned To: natale.patriciello
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-05 00:18 EDT by Robert Ammon
Modified: 2017-09-10 06:46 EDT (History)
1 user (show)

See Also:


Attachments
Updated source file with the fix (12.28 KB, text/plain)
2017-09-05 00:18 EDT, Robert Ammon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Ammon 2017-09-05 00:18:44 EDT
Created attachment 2913 [details]
Updated source file with the fix

The implementation of TcpRxBuffer::ClearSackList uses a for loop on the list iterator.  The for loop automatically increments the iterator in the for loop.  If the last element in the list is being erased from the list, then the automatic for loop iterator increment causes the iterator to go out of bounds and throw an error.

Updated source code with fix is attached.
Comment 1 natale.patriciello 2017-09-10 06:46:16 EDT
Pushed in 13057:37a503eee455, thank you.

Please note that your text editor inserts tabs.