Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential buffer overflow in CPLODBCSession::Failed (#1390) #1391

Merged
merged 2 commits into from
Mar 27, 2019

Conversation

szekerest
Copy link
Contributor

No description provided.

@@ -345,22 +345,33 @@ int CPLODBCSession::Failed( int nRetCode, HSTMT hStmt )
for(SQLSMALLINT nRecNum = 1; nDiagRetCode == SQL_SUCCESS; ++nRecNum)
{
SQLCHAR achSQLState[5 + 1] = {};
SQLCHAR achCurErrMsg[SQL_MAX_MESSAGE_LENGTH] = {};
SQLCHAR* achCurErrMsg = static_cast<SQLCHAR *>(CPLMalloc((SQL_MAX_MESSAGE_LENGTH + 1) * sizeof(SQLCHAR)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming convention: pachCurErrMsg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants