summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/extra/m_mysql.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 2449b5238..19632d669 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -454,7 +454,7 @@ class SQLConnection : public classbase
* The +1 is for null-terminating the string for mysql_real_escape_string
*/
- query = new char[req.query.q.length() + (paramlen*2)];
+ query = new char[req.query.q.length() + (paramlen*2) + 1];
queryend = query;
/* Okay, now we have a buffer large enough we need to start copying the query into it and escaping and substituting