mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 00:45:58 +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 <sys/ioctl.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
CEventManager::CEventManager() {}
|
CEventManager::CEventManager() {}
|
||||||
|
|
||||||
|
@ -139,7 +140,9 @@ void CEventManager::postEvent(const SHyprIPCEvent event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::thread(
|
std::thread(
|
||||||
[&](const SHyprIPCEvent ev) {
|
[this](SHyprIPCEvent ev) {
|
||||||
|
std::replace(ev.data.begin(), ev.data.end(), '\n', ' ');
|
||||||
|
|
||||||
eventQueueMutex.lock();
|
eventQueueMutex.lock();
|
||||||
m_dQueuedEvents.push_back(ev);
|
m_dQueuedEvents.push_back(ev);
|
||||||
eventQueueMutex.unlock();
|
eventQueueMutex.unlock();
|
||||||
|
|
Loading…
Reference in a new issue