Closed lendern closed 3 years ago
Hello, while using dpkt, I identified an issue in SCTP DATA chunk management. An SCTP DATA chunk must be padded with 0, in order to align 4-bytes boundary. Fix may be located in class Chunk:
class Chunk(dpkt.Packet): __hdr__ = ( ('type', 'B', INIT), ('flags', 'B', 0), ('len', 'H', 0) ) def unpack(self, buf): dpkt.Packet.unpack(self, buf) # FIX: SCTP DATA Chunked is padded, 4-bytes aligned length = self.len if length % 4 > 0: length = length + 4 - (length % 4) self.data = self.data[:length - self.__hdr_len__]
I assume your fix would be smarter than my proposal
Hello, while using dpkt, I identified an issue in SCTP DATA chunk management. An SCTP DATA chunk must be padded with 0, in order to align 4-bytes boundary. Fix may be located in class Chunk:
I assume your fix would be smarter than my proposal