Commit Graph

5 Commits (9fa0033966be34b73a86e178c9f0d95ddb795e51)

Author SHA1 Message Date
Juliana Fajardini a6bda3596b unittests: alloc Packet with PacketGetFromAlloc
Some unittests used SCMalloc for allocating new Packet the unittests.
While this is valid, it leads to segmentation faults when we move to
dynamic allocation of the maximum alerts allowed to be triggered by a
single packet.

This massive patch uses PacketGetFromAlloc, which initializes a Packet
in such a way that any dynamic allocated structures within will also be
initialized.

Related to
Task #4207
4 years ago
Jeff Lucovsky 83067e5a55 decode: Eliminate NULL pkt checks
This commit removes the NULL pkt check that each decoder performs as
this is a "can't happen" case.
4 years ago
Philippe Antoine 7500c29300 decode: limits the number of decoded layers
so as to avoid overrecursion leading to stack exhaustion
5 years ago
Victor Julien 3f4398cc90 decode: minor unittest cleanups 5 years ago
Victor Julien 328a94206e decode/hdlc: initial support 6 years ago