mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
socket2: sanitize data for newlines
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user