mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 05:45:59 +01:00
socket2: sanitize data for newlines
This commit is contained in:
parent
ef7ac53e99
commit
416b3d6167
1 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <sys/ioctl.h>
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
CEventManager::CEventManager() {}
|
||||
|
||||
|
@ -139,7 +140,9 @@ void CEventManager::postEvent(const SHyprIPCEvent event) {
|
|||
}
|
||||
|
||||
std::thread(
|
||||
[&](const SHyprIPCEvent ev) {
|
||||
[this](SHyprIPCEvent ev) {
|
||||
std::replace(ev.data.begin(), ev.data.end(), '\n', ' ');
|
||||
|
||||
eventQueueMutex.lock();
|
||||
m_dQueuedEvents.push_back(ev);
|
||||
eventQueueMutex.unlock();
|
||||
|
|
Loading…
Reference in a new issue