mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35: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;
|
||||
}
|
||||
|
||||
if (size < sizeof(RemoteAction)) {
|
||||
LOG_ERROR("Received data too small for RemoteAction");
|
||||
return;
|
||||
}
|
||||
|
||||
RemoteAction remote_action;
|
||||
memcpy(&remote_action, data, size);
|
||||
memcpy(&remote_action, data, sizeof(remote_action));
|
||||
|
||||
std::string remote_id(user_id, user_id_size);
|
||||
if (render->client_properties_.find(remote_id) !=
|
||||
|
||||
Reference in New Issue
Block a user