Closed crosser closed 4 years ago
self.length is the bit length of the OptsHeader, while in the while loop, we need byte length.
Attempt to continue the loop beyond the data size eventually results in IndexError exception.
This should fix the issue #477
Coverage decreased (-0.04%) to 89.205% when pulling 3691b268d3f2bf0584c5b7317940d568102f7745 on crosser:ipv6-option-unpack-use-byte-length into bc0fc98eab86a06fe3a6c9e9c860ce1e6dca5945 on kbandla:master.
I believe ip6 parser does the right thing. This proposed change breaks existing unit tests.
self.length is the bit length of the OptsHeader, while in the while loop, we need byte length.
Attempt to continue the loop beyond the data size eventually results in IndexError exception.
This should fix the issue #477