- ret = cmd_recv(conn->sock, &session_info, sizeof(session_info));
- if (ret < 0) {
- ERR("Unable to recv session info version 2.4");
+ if (payload->size < sizeof(session_info)) {
+ ERR("Unexpected payload size in \"cmd_create_session_2_4\": expected >= %zu bytes, got %zu bytes",
+ sizeof(session_info), payload->size);
+ ret = -1;