Fix buffer overrun when giving an offset to Session:receive

Source: Fedora 40: lua-mpack 2024-430678b035 Security Advisory Updates