Hi!
Working with VC++6.0 (+Visual Studio SP5) on WinNT4.0 (+SP6a)
I am developing an application. I do not find any problem when
compiling:
char dataA[3][100];
char dataB[3][100];
char dataC[3][100];
char *value;
....
if (name.equals("A"
) {
strcpy(dataA, value);
cout << "VALUE A =" << value << "\n";
}
if (name.equals("B"
) {
strcpy(dataB, value);
cout << "VALUE B =" << value << "\n";
}
if (name.equals("C"
) {
strcpy(dataC, value); // Line X
cout << "VALUE C =" << value << "\n";
}
But when executing, if I do not 'comment' Line X, I get
the next error message:
<<Debug Error - DAMAGE: after normal block (#59) at 0x00455A>>
If I check the debug, the error is placed at 'DBGHEAP.c':
if (!CheckBytes(pbData(pHead) + pHead->nDataSize, _bNoMansLandFill, nNoMansLandSize))
_RPT3(_CRT_ERROR, "DAMAGE: after %hs block (#%d) at 0x%08X.\n",
szBlockUseName[_BLOCK_TYPE(pHead->nBlockUse)],
pHead->lRequest,
(BYTE *) pbData(pHead)); <--- Here
Do I have allocated a buffer too small than I need?
How can I solve this?
Regards.
Working with VC++6.0 (+Visual Studio SP5) on WinNT4.0 (+SP6a)
I am developing an application. I do not find any problem when
compiling:
char dataA[3][100];
char dataB[3][100];
char dataC[3][100];
char *value;
....
if (name.equals("A"
strcpy(dataA, value);
cout << "VALUE A =" << value << "\n";
}
if (name.equals("B"
strcpy(dataB, value);
cout << "VALUE B =" << value << "\n";
}
if (name.equals("C"
strcpy(dataC, value); // Line X
cout << "VALUE C =" << value << "\n";
}
But when executing, if I do not 'comment' Line X, I get
the next error message:
<<Debug Error - DAMAGE: after normal block (#59) at 0x00455A>>
If I check the debug, the error is placed at 'DBGHEAP.c':
if (!CheckBytes(pbData(pHead) + pHead->nDataSize, _bNoMansLandFill, nNoMansLandSize))
_RPT3(_CRT_ERROR, "DAMAGE: after %hs block (#%d) at 0x%08X.\n",
szBlockUseName[_BLOCK_TYPE(pHead->nBlockUse)],
pHead->lRequest,
(BYTE *) pbData(pHead)); <--- Here
Do I have allocated a buffer too small than I need?
How can I solve this?
Regards.