mbuf: add sanity checks on segment metadata
authorDavid Marchand <david.marchand@6wind.com>
Mon, 7 Jan 2019 08:57:10 +0000 (09:57 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:40 +0000 (02:40 +0100)
commitdcd2a33d3c8a9ce845eb4e9e8abac0a39efe0b80
tree6432cb3aed91af7244ad92dcc2b3729fe8d2caa1
parenta1e8241a919f7239d16e63fbc41549b2c951e1ae
mbuf: add sanity checks on segment metadata

Add some basic checks on the segments offset and length metadata:
always funny to have a < 0 tailroom cast to uint16_t ;-).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.c