More debug logging, accepts msgsubelements with zero-size.

FossilOrigin-Name: 9eb3ac81235515583eba0ee3954cafa6cc28bd7560a48b8335bcd0097246e067
This commit is contained in:
user@SRH-Linux-01.(none) 2014-07-31 16:00:56 +00:00
parent f057809e19
commit 641fc28e12
1 changed files with 4 additions and 1 deletions

View File

@ -52,8 +52,11 @@ static int wtpinfo_readelem_wtp_descriptor_(struct wtpinfo * wtpinfo, int type,
}
do {
if (i+8>=len)
if (i+8>len)
{
cw_log_debug1("WTP descriptor subelement to long, length=%d>%d",i+8,len);
return -1;
}
uint32_t vendor_id=ntohl(*((uint32_t*)(msgelem+i)));