Commit 8115da80 authored by claes's avatar claes

String size was too short

parent f1afad6a
/* /*
* Proview $Id: wb_dbms.cpp,v 1.9 2008-10-15 06:04:55 claes Exp $ * Proview $Id: wb_dbms.cpp,v 1.10 2008-11-10 08:04:52 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB. * Copyright (C) 2005 SSAB Oxelösund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -669,7 +669,7 @@ void wb_dbms_env::host(const char *host) ...@@ -669,7 +669,7 @@ void wb_dbms_env::host(const char *host)
if (!host) if (!host)
return; return;
m_host = (char *)realloc(m_host, strlen(host)); m_host = (char *)realloc(m_host, strlen(host)+1);
strcpy(m_host, host); strcpy(m_host, host);
} }
...@@ -678,7 +678,7 @@ void wb_dbms_env::user(const char *user) ...@@ -678,7 +678,7 @@ void wb_dbms_env::user(const char *user)
if (!user) if (!user)
return; return;
m_user = (char *)realloc(m_user, strlen(user)); m_user = (char *)realloc(m_user, strlen(user)+1);
strcpy(m_user, user); strcpy(m_user, user);
} }
...@@ -687,7 +687,7 @@ void wb_dbms_env::passwd(const char *passwd) ...@@ -687,7 +687,7 @@ void wb_dbms_env::passwd(const char *passwd)
if (!passwd) if (!passwd)
return; return;
m_passwd = (char *)realloc(m_passwd, strlen(passwd)); m_passwd = (char *)realloc(m_passwd, strlen(passwd)+1);
strcpy(m_passwd, passwd); strcpy(m_passwd, passwd);
} }
...@@ -696,7 +696,7 @@ void wb_dbms_env::dbName(const char *dbName) ...@@ -696,7 +696,7 @@ void wb_dbms_env::dbName(const char *dbName)
if (!dbName) if (!dbName)
return; return;
m_dbName = (char *)realloc(m_dbName, strlen(dbName)); m_dbName = (char *)realloc(m_dbName, strlen(dbName)+1);
strcpy(m_dbName, dbName); strcpy(m_dbName, dbName);
} }
...@@ -705,7 +705,7 @@ void wb_dbms_env::fileName(const char *fileName) ...@@ -705,7 +705,7 @@ void wb_dbms_env::fileName(const char *fileName)
if (!fileName) if (!fileName)
return; return;
m_fileName = (char *)realloc(m_fileName, strlen(fileName)); m_fileName = (char *)realloc(m_fileName, strlen(fileName)+1);
strcpy(m_fileName, fileName); strcpy(m_fileName, fileName);
} }
...@@ -755,7 +755,7 @@ void wb_dbms_env::socket(const char *socket) ...@@ -755,7 +755,7 @@ void wb_dbms_env::socket(const char *socket)
if (!socket) if (!socket)
return; return;
m_socket = (char *)realloc(m_socket, strlen(socket)); m_socket = (char *)realloc(m_socket, strlen(socket)+1);
strcpy(m_socket, socket); strcpy(m_socket, socket);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment