Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Array bounds read in lstrcpynA when calling OCILogon in window platform

juipinDec 30 2004 — edited Aug 19 2006
I got the following error from purify:

[E] ABR: Array bounds read in lstrcpynA {1 occurrence}
Reading 11 bytes from 0x22b27e71 (1 byte at 0x22b27e7b illegal)
Address 0x22b27e71 is argument #2 of lstrcpynA
Address 0x22b27e71 is 49 bytes into a 59 byte block at 0x22b27e40
Address 0x22b27e71 points to a malloc'd block in heap 0x204e0000
Thread ID: 0x488
Error location
lstrcpynA [KERNEL32.dll]
COracleDatabase::Connect(char *,char *,char *) [OracleDatabase.cpp:89]

Following is code:

BOOL
COracleDatabase::Connect( char* pszDatabase, char* pszUser, char* pszPassword )
{
LPCTSTR pszProcName = "COracleDatabase::Connect";
ASSERT( m_pEnvironment );
ASSERT( strlen(pszDatabase) );

if( m_pEnvironment && strlen(pszDatabase) )
{
PostDiagnosticMessage( __FILE__, __LINE__, "%s: Connecting to DB<%s>, USR<%s>, PWD<%s>", pszProcName, pszDatabase, pszUser, pszPassword );
if( OCI_SUCCESS == OCILogon( m_pEnvironment, m_pError->GetErrorHandle(), &m_pServiceContext, (BYTE*)pszUser, strlen(pszUser), (BYTE*)pszPassword, strlen(pszPassword), (BYTE*)pszDatabase, strlen(pszDatabase) ) )
{
Does any one has the same problem?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2006
Added on Dec 30 2004
3 comments
1,988 views