Commit c9792720 authored by claes's avatar claes

String length was to short

parent 7326a1da
/*
* Proview $Id: sev_dbms.cpp,v 1.3 2008-09-18 14:37:43 claes Exp $
* Proview $Id: sev_dbms.cpp,v 1.4 2008-11-10 07:57:59 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -67,7 +67,7 @@ void sev_dbms_env::host(const char *host)
if (!host)
return;
m_host = (char *)realloc(m_host, strlen(host));
m_host = (char *)realloc(m_host, strlen(host)+1);
strcpy(m_host, host);
}
......@@ -76,7 +76,7 @@ void sev_dbms_env::user(const char *user)
if (!user)
return;
m_user = (char *)realloc(m_user, strlen(user));
m_user = (char *)realloc(m_user, strlen(user)+1);
strcpy(m_user, user);
}
......@@ -94,7 +94,7 @@ void sev_dbms_env::dbName(const char *dbName)
if (!dbName)
return;
m_dbName = (char *)realloc(m_dbName, strlen(dbName));
m_dbName = (char *)realloc(m_dbName, strlen(dbName)+1);
strcpy(m_dbName, dbName);
}
......@@ -103,7 +103,7 @@ void sev_dbms_env::fileName(const char *fileName)
if (!fileName)
return;
m_fileName = (char *)realloc(m_fileName, strlen(fileName));
m_fileName = (char *)realloc(m_fileName, strlen(fileName)+1);
strcpy(m_fileName, fileName);
}
......@@ -144,7 +144,7 @@ void sev_dbms_env::socket(const char *socket)
if (!socket)
return;
m_socket = (char *)realloc(m_socket, strlen(socket));
m_socket = (char *)realloc(m_socket, strlen(socket)+1);
strcpy(m_socket, socket);
}
......@@ -398,7 +398,7 @@ int sev_dbms_env::open(void)
int sev_dbms_env::get_systemname()
{
FILE *file;
char fname[120];
pwr_tFileName fname;
char nodename[40];
char *bus_str;
int bus;
......
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