summaryrefslogtreecommitdiff
path: root/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'users.cpp')
-rw-r--r--users.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/users.cpp b/users.cpp
index f2cf066..c82756c 100644
--- a/users.cpp
+++ b/users.cpp
@@ -100,7 +100,8 @@ bool cUser::Parse(const char *s)
const char *cUser::ToText(void)
{
char* buffer = NULL;
- asprintf(&buffer, "%d:%s:%s:%d", m_ID, m_Name.c_str(), m_PasswordMD5.c_str(), m_Userrights);
+ if (asprintf(&buffer, "%d:%s:%s:%d", m_ID, m_Name.c_str(), m_PasswordMD5.c_str(), m_Userrights) < 0)
+ return NULL;
return buffer;
}