-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
The function dessert_meshsend performs a consistent check via dessert_msg_check. Here, the function checks if the size of the header and the payload length are less than the supposed length (as passed to the function). While the function performs a ntohs on the length fields, the dessert_meshsend function doesn't. The ad hoc fix would be to change the following code from
/* check message - we only send valid messages! */
if(dessert_msg_check(msgin, msgin->hlen + msgin->plen)) {
dessert_warn("will not send invalid message - aborting");
return EINVAL;
}to
/* check message - we only send valid messages! */
if(dessert_msg_check(msgin, ntohs(msgin->hlen) + ntohs(msgin->plen))) {
dessert_warn("will not send invalid message - aborting");
return EINVAL;
}However, we should check if this acutally breaks things.
Reactions are currently unavailable