Board index » cppbuilder » Weard CodeGuard message

Weard CodeGuard message


2006-06-14 05:53:08 PM
cppbuilder24
Hi people,
CodeGuard got me this weard message.
"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10 in
block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes long."
What can it means "only 11 bytes" if the access is to 4 bytes?
I suspect it is in accessing an empty const string [""] when i call a my
method
ObjCheckMessage->CodeAck(
mess,&l_mess,
"",0,
ObjCheckMessage->GetCodeAck(),
ObjCheckMessage->GetIndMess()
);
Infact, if i use a
String empty
ObjCheckMessage->CodeAck(
...
empty,0,
...);
all works correctly.
Before to post this message, i thought the problem [that was happening with
'3' instead of '11']
was lied to the option "merge duplicate strings" of the compiler that i just
enabled yesterday.
But also after having disabled it, it happened with the '11'.
Any ideas?
Tahnk you.
 
 

Re:Weard CodeGuard message

I looked in the detailed .map file and i found the line
0002:0000673C 0000011A C=DATA S=_DATA G=DGROUP M=MyPath\MyFile1.OBJ ACBP=A9
0002:00006844
Infact i have the problem just in that MyFile1.
a) is it normal that 0x637C + 0x11A = 0x6496>0x6844?
b) int that file ther'is a class defined. Does it means that the problem is
in accessing a member of that class?
Thank you,
Mauro.
"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote
Hi people,

CodeGuard got me this weard message.

"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10 in
block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes long."

What can it means "only 11 bytes" if the access is to 4 bytes?


I suspect it is in accessing an empty const string [""] when i call a my
method

ObjCheckMessage->CodeAck(
mess,&l_mess,
"",0,
ObjCheckMessage->GetCodeAck(),
ObjCheckMessage->GetIndMess()
);
Infact, if i use a
String empty
ObjCheckMessage->CodeAck(
...
empty,0,
...);
all works correctly.

Before to post this message, i thought the problem [that was happening
with
'3' instead of '11']
was lied to the option "merge duplicate strings" of the compiler that i
just
enabled yesterday.
But also after having disabled it, it happened with the '11'.

Any ideas?
Tahnk you.


 

Re:Weard CodeGuard message

"mauro russo" < XXXX@XXXXX.COM >wrote in message
Quote
CodeGuard got me this weard message.

"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10 in
block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes long."

What can it means "only 11 bytes" if the access is to 4 bytes?

"weird" is the spelling you need.
It's trying to read 4 bytes at offset 0x10 in a block that is only 11 bytes
long.
So it IS trying to access outside the block.
- Roddy
 

{smallsort}

Re:Weard CodeGuard message

Yes, right.
Some tips about the line in the map file that i posted?
Thank you.
"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
Quote
"mauro russo" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>CodeGuard got me this weard message.
>
>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10
in
>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes
long."
>
>What can it means "only 11 bytes" if the access is to 4 bytes?
>

"weird" is the spelling you need.

It's trying to read 4 bytes at offset 0x10 in a block that is only 11
bytes
long.

So it IS trying to access outside the block.

- Roddy


 

Re:Weard CodeGuard message

suspected Code Guard or Linker error!!!
In the attached file [on borland.public.attachments]
it is showed the screenshot of my pc.
Yuo can note that all parameters of the CALL_GDA_EGY that catches the
problem
are constants (except eax) [eax (0x00 in my case) 0x00, 0x04, 0x003c674d,
0x0a].
So, it means it should be:
a) an error of the linker
b) an error of "inserting" code of CodeGuard facilities.
c) what else?
In fact the problem seems to be 0x0a [the message CodeGuard reads 'at
0x003C647D+10...'].
You can also note that the problem is catched for the third call to
CALL_GDA_EGY.
Does it mean that the problem is for the third parameter?
[MAX_LENGT_MESSAGES that is a #define (value 127)]
or the third-last parameter? [the constant 0].
I hope you can confirm what parameter is it, so i'll concentrate to
investigate on only that parameter.
In the second attachment i report the following asm-code of the
method-call-code and the CodeGuard Window.
PS: i'll post the two files on the .attachment newsgroup in some minutes.
Thank you to pay attention,
Mauro.
"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
Quote
"mauro russo" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>CodeGuard got me this weard message.
>
>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10
in
>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes
long."
>
>What can it means "only 11 bytes" if the access is to 4 bytes?
>

"weird" is the spelling you need.

It's trying to read 4 bytes at offset 0x10 in a block that is only 11
bytes
long.

So it IS trying to access outside the block.

- Roddy


 

Re:Weard CodeGuard message

That's the state of my investigation:
The parameters are (as documented and as i'm sure you know already) pushed
on the stack in the opposite order.
The problem is catched for the parameters mess (the empty "" in my case).
In fact the address passed is 0x3C6757 that is just 0x3C674D+0x0a.
I'll check how CALL_GDA_EGY extracts the 'length 11'.
The main point is that i really suspect a CodeGuard or a Linker error,
because
now i'm almost sure that is about the parameter "". That's constant
allocated in the
space beginning in 0x3C673C (as reported in the line of the .map file that i
post already).
How hope some of you can support what i believe, analyzing the attachments
in
Thank you,
Mauro.
"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote
suspected Code Guard or Linker error!!!

In the attached file [on borland.public.attachments]
it is showed the screenshot of my pc.
Yuo can note that all parameters of the CALL_GDA_EGY that catches the
problem
are constants (except eax) [eax (0x00 in my case) 0x00, 0x04, 0x003c674d,
0x0a].
So, it means it should be:
a) an error of the linker
b) an error of "inserting" code of CodeGuard facilities.
c) what else?
In fact the problem seems to be 0x0a [the message CodeGuard reads 'at
0x003C647D+10...'].

You can also note that the problem is catched for the third call to
CALL_GDA_EGY.
Does it mean that the problem is for the third parameter?
[MAX_LENGT_MESSAGES that is a #define (value 127)]
or the third-last parameter? [the constant 0].
I hope you can confirm what parameter is it, so i'll concentrate to
investigate on only that parameter.

In the second attachment i report the following asm-code of the
method-call-code and the CodeGuard Window.

PS: i'll post the two files on the .attachment newsgroup in some minutes.

Thank you to pay attention,
Mauro.

"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
news: XXXX@XXXXX.COM ...
>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>CodeGuard got me this weard message.
>>
>>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett 0+10
in
>>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes
long."
>>
>>What can it means "only 11 bytes" if the access is to 4 bytes?
>>
>
>"weird" is the spelling you need.
>
>It's trying to read 4 bytes at offset 0x10 in a block that is only 11
bytes
>long.
>
>So it IS trying to access outside the block.
>
>- Roddy
>
>


 

Re:Weard CodeGuard message

What's the line of code where CodeGuard is showing the problem?
CodeGuard doesn't normally get it wrong - I normally find that I made a
mistake.
Pete
"mauro russo" < XXXX@XXXXX.COM >wrote in message
Quote
That's the state of my investigation:

The parameters are (as documented and as i'm sure you know already) pushed
on the stack in the opposite order.

The problem is catched for the parameters mess (the empty "" in my case).
In fact the address passed is 0x3C6757 that is just 0x3C674D+0x0a.
I'll check how CALL_GDA_EGY extracts the 'length 11'.
The main point is that i really suspect a CodeGuard or a Linker error,
because
now i'm almost sure that is about the parameter "". That's constant
allocated in the
space beginning in 0x3C673C (as reported in the line of the .map file that
i
post already).

How hope some of you can support what i believe, analyzing the attachments
in
news: XXXX@XXXXX.COM ...

Thank you,
Mauro.

"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
news: XXXX@XXXXX.COM ...
>suspected Code Guard or Linker error!!!
>
>In the attached file [on borland.public.attachments]
>it is showed the screenshot of my pc.
>Yuo can note that all parameters of the CALL_GDA_EGY that catches the
>problem
>are constants (except eax) [eax (0x00 in my case) 0x00, 0x04, 0x003c674d,
>0x0a].
>So, it means it should be:
>a) an error of the linker
>b) an error of "inserting" code of CodeGuard facilities.
>c) what else?
>In fact the problem seems to be 0x0a [the message CodeGuard reads 'at
>0x003C647D+10...'].
>
>You can also note that the problem is catched for the third call to
>CALL_GDA_EGY.
>Does it mean that the problem is for the third parameter?
>[MAX_LENGT_MESSAGES that is a #define (value 127)]
>or the third-last parameter? [the constant 0].
>I hope you can confirm what parameter is it, so i'll concentrate to
>investigate on only that parameter.
>
>In the second attachment i report the following asm-code of the
>method-call-code and the CodeGuard Window.
>
>PS: i'll post the two files on the .attachment newsgroup in some minutes.
>
>Thank you to pay attention,
>Mauro.
>
>"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
>news: XXXX@XXXXX.COM ...
>>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>>news: XXXX@XXXXX.COM ...
>>>CodeGuard got me this weard message.
>>>
>>>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett
>>>0+10
>in
>>>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes
>long."
>>>
>>>What can it means "only 11 bytes" if the access is to 4 bytes?
>>>
>>
>>"weird" is the spelling you need.
>>
>>It's trying to read 4 bytes at offset 0x10 in a block that is only 11
>bytes
>>long.
>>
>>So it IS trying to access outside the block.
>>
>>- Roddy
>>
>>
>
>


 

Re:Weard CodeGuard message

"Pete Fraser" < XXXX@XXXXX.COM >wrote in the
message news:449003eb$ XXXX@XXXXX.COM ...
Quote
What's the line of code where CodeGuard is showing the problem?
In the call of method CodeAck.
Quote
CodeGuard doesn't normally get it wrong - I normally find that I made a
mistake.
I never told that it gets wrong the number of the line. I told that it gets
wrong the error, or that the linker
made a mistake. The motivation of my thinking is that Codeguard shows the
problem in accessing a constant parameter,
that's the const char array "".
Quote

Pete
Mauro Russo.
Quote
"mauro russo" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>That's the state of my investigation:
>
>The parameters are (as documented and as i'm sure you know already)
pushed
>on the stack in the opposite order.
>
>The problem is catched for the parameters mess (the empty "" in my
case).
>In fact the address passed is 0x3C6757 that is just 0x3C674D+0x0a.
>I'll check how CALL_GDA_EGY extracts the 'length 11'.
>The main point is that i really suspect a CodeGuard or a Linker error,
>because
>now i'm almost sure that is about the parameter "". That's constant
>allocated in the
>space beginning in 0x3C673C (as reported in the line of the .map file
that
>i
>post already).
>
>How hope some of you can support what i believe, analyzing the
attachments
>in
>news: XXXX@XXXXX.COM ...
>
>Thank you,
>Mauro.
>
>"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
>news: XXXX@XXXXX.COM ...
>>suspected Code Guard or Linker error!!!
>>
>>In the attached file [on borland.public.attachments]
>>it is showed the screenshot of my pc.
>>Yuo can note that all parameters of the CALL_GDA_EGY that catches the
>>problem
>>are constants (except eax) [eax (0x00 in my case) 0x00, 0x04,
0x003c674d,
>>0x0a].
>>So, it means it should be:
>>a) an error of the linker
>>b) an error of "inserting" code of CodeGuard facilities.
>>c) what else?
>>In fact the problem seems to be 0x0a [the message CodeGuard reads 'at
>>0x003C647D+10...'].
>>
>>You can also note that the problem is catched for the third call to
>>CALL_GDA_EGY.
>>Does it mean that the problem is for the third parameter?
>>[MAX_LENGT_MESSAGES that is a #define (value 127)]
>>or the third-last parameter? [the constant 0].
>>I hope you can confirm what parameter is it, so i'll concentrate to
>>investigate on only that parameter.
>>
>>In the second attachment i report the following asm-code of the
>>method-call-code and the CodeGuard Window.
>>
>>PS: i'll post the two files on the .attachment newsgroup in some
minutes.
>>
>>Thank you to pay attention,
>>Mauro.
>>
>>"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
>>news: XXXX@XXXXX.COM ...
>>>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>>>news: XXXX@XXXXX.COM ...
>>>>CodeGuard got me this weard message.
>>>>
>>>>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett
>>>>0+10
>>in
>>>>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11 bytes
>>long."
>>>>
>>>>What can it means "only 11 bytes" if the access is to 4 bytes?
>>>>
>>>
>>>"weird" is the spelling you need.
>>>
>>>It's trying to read 4 bytes at offset 0x10 in a block that is only 11
>>bytes
>>>long.
>>>
>>>So it IS trying to access outside the block.
>>>
>>>- Roddy
>>>
>>>
>>
>>
>
>


 

Re:Weard CodeGuard message

You need to show the line of code (in context) which the error occurs in.
If you can do this we can tell you whether it is your problem or the
linkers/codeguard.
Thanks, Pete
"mauro russo" < XXXX@XXXXX.COM >wrote in message
Quote

"Pete Fraser" < XXXX@XXXXX.COM >wrote in
the
message news:449003eb$ XXXX@XXXXX.COM ...
>What's the line of code where CodeGuard is showing the problem?

In the call of method CodeAck.

>CodeGuard doesn't normally get it wrong - I normally find that I made a
>mistake.

I never told that it gets wrong the number of the line. I told that it
gets
wrong the error, or that the linker
made a mistake. The motivation of my thinking is that Codeguard shows the
problem in accessing a constant parameter,
that's the const char array "".

>
>Pete

Mauro Russo.

>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>That's the state of my investigation:
>>
>>The parameters are (as documented and as i'm sure you know already)
pushed
>>on the stack in the opposite order.
>>
>>The problem is catched for the parameters mess (the empty "" in my
case).
>>In fact the address passed is 0x3C6757 that is just 0x3C674D+0x0a.
>>I'll check how CALL_GDA_EGY extracts the 'length 11'.
>>The main point is that i really suspect a CodeGuard or a Linker error,
>>because
>>now i'm almost sure that is about the parameter "". That's constant
>>allocated in the
>>space beginning in 0x3C673C (as reported in the line of the .map file
that
>>i
>>post already).
>>
>>How hope some of you can support what i believe, analyzing the
attachments
>>in
>>news: XXXX@XXXXX.COM ...
>>
>>Thank you,
>>Mauro.
>>
>>"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
>>news: XXXX@XXXXX.COM ...
>>>suspected Code Guard or Linker error!!!
>>>
>>>In the attached file [on borland.public.attachments]
>>>it is showed the screenshot of my pc.
>>>Yuo can note that all parameters of the CALL_GDA_EGY that catches the
>>>problem
>>>are constants (except eax) [eax (0x00 in my case) 0x00, 0x04,
0x003c674d,
>>>0x0a].
>>>So, it means it should be:
>>>a) an error of the linker
>>>b) an error of "inserting" code of CodeGuard facilities.
>>>c) what else?
>>>In fact the problem seems to be 0x0a [the message CodeGuard reads 'at
>>>0x003C647D+10...'].
>>>
>>>You can also note that the problem is catched for the third call to
>>>CALL_GDA_EGY.
>>>Does it mean that the problem is for the third parameter?
>>>[MAX_LENGT_MESSAGES that is a #define (value 127)]
>>>or the third-last parameter? [the constant 0].
>>>I hope you can confirm what parameter is it, so i'll concentrate to
>>>investigate on only that parameter.
>>>
>>>In the second attachment i report the following asm-code of the
>>>method-call-code and the CodeGuard Window.
>>>
>>>PS: i'll post the two files on the .attachment newsgroup in some
minutes.
>>>
>>>Thank you to pay attention,
>>>Mauro.
>>>
>>>"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel messaggio
>>>news: XXXX@XXXXX.COM ...
>>>>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>>>>news: XXXX@XXXXX.COM ...
>>>>>CodeGuard got me this weard message.
>>>>>
>>>>>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at offsett
>>>>>0+10
>>>in
>>>>>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11
>>>>>bytes
>>>long."
>>>>>
>>>>>What can it means "only 11 bytes" if the access is to 4 bytes?
>>>>>
>>>>
>>>>"weird" is the spelling you need.
>>>>
>>>>It's trying to read 4 bytes at offset 0x10 in a block that is only
>>>>11
>>>bytes
>>>>long.
>>>>
>>>>So it IS trying to access outside the block.
>>>>
>>>>- Roddy
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:Weard CodeGuard message

Just a confirmation.
Did you see the attachment i posted on the attachment newsgroup?
There i showed the code line in the source (C++) and the asm too.
Thank you,
Mauro.
"Pete Fraser" < XXXX@XXXXX.COM >ha scritto
nel messaggio news: XXXX@XXXXX.COM ...
Quote
You need to show the line of code (in context) which the error occurs in.
If you can do this we can tell you whether it is your problem or the
linkers/codeguard.

Thanks, Pete

"mauro russo" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>
>"Pete Fraser" < XXXX@XXXXX.COM >wrote in
>the
>message news:449003eb$ XXXX@XXXXX.COM ...
>>What's the line of code where CodeGuard is showing the problem?
>
>In the call of method CodeAck.
>
>>CodeGuard doesn't normally get it wrong - I normally find that I made a
>>mistake.
>
>I never told that it gets wrong the number of the line. I told that it
>gets
>wrong the error, or that the linker
>made a mistake. The motivation of my thinking is that Codeguard shows
the
>problem in accessing a constant parameter,
>that's the const char array "".
>
>>
>>Pete
>
>Mauro Russo.
>
>>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>>news: XXXX@XXXXX.COM ...
>>>That's the state of my investigation:
>>>
>>>The parameters are (as documented and as i'm sure you know already)
>pushed
>>>on the stack in the opposite order.
>>>
>>>The problem is catched for the parameters mess (the empty "" in my
>case).
>>>In fact the address passed is 0x3C6757 that is just 0x3C674D+0x0a.
>>>I'll check how CALL_GDA_EGY extracts the 'length 11'.
>>>The main point is that i really suspect a CodeGuard or a Linker
error,
>>>because
>>>now i'm almost sure that is about the parameter "". That's constant
>>>allocated in the
>>>space beginning in 0x3C673C (as reported in the line of the .map file
>that
>>>i
>>>post already).
>>>
>>>How hope some of you can support what i believe, analyzing the
>attachments
>>>in
>>>news: XXXX@XXXXX.COM ...
>>>
>>>Thank you,
>>>Mauro.
>>>
>>>"mauro russo" < XXXX@XXXXX.COM >ha scritto nel messaggio
>>>news: XXXX@XXXXX.COM ...
>>>>suspected Code Guard or Linker error!!!
>>>>
>>>>In the attached file [on borland.public.attachments]
>>>>it is showed the screenshot of my pc.
>>>>Yuo can note that all parameters of the CALL_GDA_EGY that catches
the
>>>>problem
>>>>are constants (except eax) [eax (0x00 in my case) 0x00, 0x04,
>0x003c674d,
>>>>0x0a].
>>>>So, it means it should be:
>>>>a) an error of the linker
>>>>b) an error of "inserting" code of CodeGuard facilities.
>>>>c) what else?
>>>>In fact the problem seems to be 0x0a [the message CodeGuard reads
'at
>>>>0x003C647D+10...'].
>>>>
>>>>You can also note that the problem is catched for the third call to
>>>>CALL_GDA_EGY.
>>>>Does it mean that the problem is for the third parameter?
>>>>[MAX_LENGT_MESSAGES that is a #define (value 127)]
>>>>or the third-last parameter? [the constant 0].
>>>>I hope you can confirm what parameter is it, so i'll concentrate to
>>>>investigate on only that parameter.
>>>>
>>>>In the second attachment i report the following asm-code of the
>>>>method-call-code and the CodeGuard Window.
>>>>
>>>>PS: i'll post the two files on the .attachment newsgroup in some
>minutes.
>>>>
>>>>Thank you to pay attention,
>>>>Mauro.
>>>>
>>>>"Roddy Pratt" <roddy at spam fritter dot com>ha scritto nel
messaggio
>>>>news: XXXX@XXXXX.COM ...
>>>>>"mauro russo" < XXXX@XXXXX.COM >wrote in message
>>>>>news: XXXX@XXXXX.COM ...
>>>>>>CodeGuard got me this weard message.
>>>>>>
>>>>>>"Attempt to access 4 byte(s) at 0x003C674D+10, that is at
offsett
>>>>>>0+10
>>>>in
>>>>>>block 0x003C674D(=SomeMyDll.DLL:0x02:00674D) which is only 11
>>>>>>bytes
>>>>long."
>>>>>>
>>>>>>What can it means "only 11 bytes" if the access is to 4 bytes?
>>>>>>
>>>>>
>>>>>"weird" is the spelling you need.
>>>>>
>>>>>It's trying to read 4 bytes at offset 0x10 in a block that is only
>>>>>11
>>>>bytes
>>>>>long.
>>>>>
>>>>>So it IS trying to access outside the block.
>>>>>
>>>>>- Roddy
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:Weard CodeGuard message

"mauro russo" < XXXX@XXXXX.COM >wrote in message
Quote
There i showed the code line in the source (C++) and the asm too.

< lots of stuff snipped>
Mauro, please don't overquote.
Codeguard is checking the parameters to your function "CodeAck". Nobody can
tell anything much unless you show us the declaration of that method. Also,
post the FULL line of code, causing the problem, a screenshot with the
source code partially obscured by another window isn't much help.
I think you're right that the problem is with the empty string parameter "".
I'd hope that CodeAck is expecting a "const char *" for that parameter...
- Roddy
 

Re:Weard CodeGuard message

"Roddy Pratt" <roddy at spam fritter dot com>wrote in the message
Quote
"mauro russo" < XXXX@XXXXX.COM >wrote in message
news:44905019$ XXXX@XXXXX.COM ...

checking the parameters to your function "CodeAck". Nobody can
tell anything much unless you show us the declaration of that method.
bool CodeAck( byte *buffer_complete,
unsigned int &length_buffer_out,
unsigned int max_l_buffer_out,
const byte *mess,unsigned int length_mess,
int type_ack,
unsigned int ind_message) const;
Quote
Also,
post the FULL line of code, causing the problem, a screenshot with the
source code partially obscured by another window isn't much help.
What you see is the FULL line. In fact i was careful to don't cover any
important code.
I wrote the code not using all 80 chars of the editing, but less to keep the
code mroe readable.
Quote
I think you're right that the problem is with the empty string parameter
"".
I'd hope that CodeAck is expecting a "const char *" for that parameter...
Really, as you could see, is a const byte *. Is it possible it can be the
cause?
It seems to me it can't, but i hope it can, so at least i can still full
trust CodeGuard.
Replacing a local variable [String empty] and passing
this variable to the method CodeAck [by empty.c_str()] the problem
disappears.
Quote
- Roddy
Thank you,
Mauro.
Quote

 

Re:Weard CodeGuard message

Hi,
I am having a similar CodeGuard message. I could not tell if anyone ever
actually answered mauro's question, so I thought I'd post my version here
too with the code.
After I do a Version Query, I am trying to scan in the data into 4 separate
chunks as follows:
if (VerQueryValue(aboutVerInfoBuffer, aboutVerBaseString.c_str(), &result,
&resultLen))
{
sscanf((char*)result, "%u.%u.%u.%u", &maj, &min, &rev, &bld);
}
where maj, min, rev, and bld are all unsigned ints and result is declared as
LPVOID.
CodeGuard errors by saying the Access overrun was from an 'Attempt to access
4 byte(s) at 0x0012F9F0, that is at offset 8 in local block
0x0012F9E8(=[ebp-0xA4] @Program1.exe:0x01:056A38) which is only 8 bytes
long.'
How can I fix this problem so that the access overrun will go away?
 

Re:Weard CodeGuard message

In article <44a53b3d$ XXXX@XXXXX.COM >,
"poojo hackma" <poojo.com/mail>wrote:
Quote
After I do a Version Query, I am trying to scan in the data into 4 separate
chunks as follows:


if (VerQueryValue(aboutVerInfoBuffer, aboutVerBaseString.c_str(), &result,
&resultLen))
{
sscanf((char*)result, "%u.%u.%u.%u", &maj, &min, &rev, &bld);
}

where maj, min, rev, and bld are all unsigned ints and result is declared as
LPVOID.
I need a little more code, where do you allocate the memory for
result? I suspect that is where your problem may lie.
--
-David
Quis custodiet custodes ipsos?
 

Re:Weard CodeGuard message

That may be my problem: I did not!
How should I allocate memory to this? I tried "result = malloc(20);", but
CodeGuard didn't like that either.