From b23a81184919b2287d774fdffa5b0f71657ad0f9 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 18 May 2016 01:01:08 +0200 Subject: [PATCH] Fixed stats reporting corrupt stream name under certain conditions. --- lib/shared_memory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index 72352393..0c25526b 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -677,6 +677,9 @@ namespace IPC { name[splitChar] = '+'; } memcpy(data + 48, name.c_str(), std::min((int)name.size(), 100)); + if (name.size() < 100){ + data[48+name.size()] = 0; + } } ///\brief Gets the name of the stream this user is viewing