Tries also to handle messagages with extra data.

FossilOrigin-Name: 9152a202bb9898b744737d1e40b1402d64f8a6c7f45990ae0815458757229706
This commit is contained in:
7u83@mail.ru 2014-08-30 04:56:05 +00:00
parent c576a8d722
commit 6cab07c9c1
1 changed files with 2 additions and 1 deletions

View File

@ -58,8 +58,9 @@ static int cwrmsg_init_ctrlhdr(struct conn * conn, struct cwrmsg * cwrmsg, uint8
return 0;
}
if (8+cwrmsg->msgelems_len < len){
cw_dbg(DBG_CW_RFC,"Packet from from %s has %d bytes extra data, ignoring.",
cw_dbg(DBG_CW_RFC,"Packet from from %s has %d bytes extra data.",
sock_addr2str(&conn->addr),len-8-cwrmsg->msgelems_len);
cwrmsg->msgelems_len=len-8;
}
if (8+cwrmsg->msgelems_len > len){