
<         payload_size = smh->submessageLength -
---
>         payload_size = smh->submessageLength - ...;
>         if (payload_size < 0 || payload_size > MAX_PAYLOAD_SIZE) {
>             // handle error or invalid payload size
>             return false;
>         }
