mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Fix size of allocated memory in xbus strdup
This commit is contained in:
@@ -94,7 +94,7 @@ class QSharedApplication : public QApplication
|
|||||||
m_weakptr = ptr;
|
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:
|
public:
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user