Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debug Error into DBHHEAP.C

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
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 << &quot;VALUE A =&quot; << value << &quot;\n&quot;;
}
if (name.equals(&quot;B&quot;)) {
strcpy(dataB, value);
cout << &quot;VALUE B =&quot; << value << &quot;\n&quot;;
}
if (name.equals(&quot;C&quot;)) {
strcpy(dataC, value); // Line X
cout << &quot;VALUE C =&quot; << value << &quot;\n&quot;;
}

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, &quot;DAMAGE: after %hs block (#%d) at 0x%08X.\n&quot;,
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top