Fix size of allocated memory in xbus strdup

This commit is contained in:
Roland Winklmeier
2016-04-30 11:50:52 +02:00
parent 014c218afa
commit 31b20bb2fb

View File

@@ -94,7 +94,7 @@ class QSharedApplication : public QApplication
m_weakptr = ptr;
}
static char *strdup(const char *s) { auto s2 = static_cast<char *>(std::malloc(std::strlen(s))); return std::strcpy(s2, s); }
static char *strdup(const char *s) { auto s2 = static_cast<char *>(std::malloc(std::strlen(s) + 1)); return std::strcpy(s2, s); }
public:
/*!