aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-08-22 19:42:05 -0700
committerChris Robinson <[email protected]>2021-08-22 19:42:05 -0700
commit4800dfafce45930aac9d54d0fecb24fb6b5d9011 (patch)
tree5bffe9496494427e4f525ba48d526062647284ea /alc
parent643c1648fbbe86922c07dd0b89d3b3e5b32eed5d (diff)
Properly limit the name header comparison length
Diffstat (limited to 'alc')
-rw-r--r--alc/backends/pipewire.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index d19fcaa4..096997c4 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1501,7 +1501,7 @@ void PipeWireCapture::open(const char *name)
auto match_name = [name](const DeviceNode &n) -> bool
{ return n.mCapture && n.mName == name; };
auto match = std::find_if(DeviceList.cbegin(), DeviceList.cend(), match_name);
- if(match == DeviceList.cend() && std::strcmp(name, "Monitor of ") == 0)
+ if(match == DeviceList.cend() && std::strncmp(name, "Monitor of ", 11) == 0)
{
const char *sinkname{name + 11};
auto match_sinkname = [sinkname](const DeviceNode &n) -> bool