Return only memory

Fix the last octet of the length from being included in the memory, drop
the padding from heartbeat response.