From 44cbe5680871d66193163263dfb29192964853bc Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 26 Nov 2008 16:35:40 +0100 Subject: [PATCH] Fix reception of LLDP-MED inventory: one byte was stripped --- src/lldp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lldp.c b/src/lldp.c index 4d960032..d9805b8f 100644 --- a/src/lldp.c +++ b/src/lldp.c @@ -619,10 +619,10 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, if (size <= 4) b = NULL; else { - b = (char*)malloc(size - 4); + b = (char*)malloc(size - 3); strlcpy(b, (char*)(frame + f), - size - 4); + size - 3); } switch (subtype) { case LLDP_TLV_MED_IV_HW: -- 2.39.5