Bug 2781

Summary: TcpRxBuffer::ClearSackList Fails when the last element is erased
Product: ns-3 Reporter: Robert Ammon <ammo6818>
Component: tcpAssignee: natale.patriciello
Severity: critical CC: ns-bugs
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Updated source file with the fix

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.