You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method dessert_msg_getpayload retrieves a pointer to the payload of a dessert message. It returns the length of the payload. However the payload is not transformed to host byte order. From the source code
int dessert_msg_getpayload(dessert_msg_t* msg, void** payload) {
/* test if payload is present in msg */
if(msg->plen == 0) {
*payload = NULL;
return 0;
}
*payload = (uint8_t*) msg + ntohs(msg->hlen);
return msg->plen;
}
It sets the pointer to the right position (after the header), but the payload length should be transformed via ntohs.
The text was updated successfully, but these errors were encountered:
The method
dessert_msg_getpayload
retrieves a pointer to the payload of a dessert message. It returns the length of the payload. However the payload is not transformed to host byte order. From the source codeIt sets the pointer to the right position (after the header), but the payload length should be transformed via ntohs.
The text was updated successfully, but these errors were encountered: