Fixed buffer overflow (Sebastian Gottschalk)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-03-14 14:14:57 +00:00
parent 5796f3e926
commit 2e4dc1ddb1

View File

@@ -1912,7 +1912,7 @@ void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
} }
wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN); wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN);
errorList[pLast][DB_MAX_ERROR_MSG_LEN] = 0; errorList[pLast][DB_MAX_ERROR_MSG_LEN-1] = 0;
if (SQLState.length()) if (SQLState.length())
if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR) if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR)