packet: set length of 0 for too big copy

pull/5627/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 6d2247391e
commit d5ac77ee8b

@ -222,6 +222,7 @@ inline int PacketCopyDataOffset(Packet *p, uint32_t offset, const uint8_t *data,
{
if (unlikely(offset + datalen > MAX_PAYLOAD_SIZE)) {
/* too big */
SET_PKT_LEN(p, 0);
return -1;
}

Loading…
Cancel
Save