mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] fix RemoteAction read from received data
This commit is contained in:
@@ -277,8 +277,13 @@ void Render::OnReceiveDataBufferCb(const char *data, size_t size,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size < sizeof(RemoteAction)) {
|
||||||
|
LOG_ERROR("Received data too small for RemoteAction");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RemoteAction remote_action;
|
RemoteAction remote_action;
|
||||||
memcpy(&remote_action, data, size);
|
memcpy(&remote_action, data, sizeof(remote_action));
|
||||||
|
|
||||||
std::string remote_id(user_id, user_id_size);
|
std::string remote_id(user_id, user_id_size);
|
||||||
if (render->client_properties_.find(remote_id) !=
|
if (render->client_properties_.find(remote_id) !=
|
||||||
|
|||||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: 78804fce81...6d4feff315
Reference in New Issue
Block a user