Data is corrupting when address sent to another module

Hi All,

I am sending adress to another module where address remains same but data is corrupted by adding the data (Hex BC 55 36 70) to beginning of the data. Please do help me to find out the reason for this and the meaning of this.

Code snippet:
void *ptr;

sendToFunc((char*)ptr) (data is “I am Pramod”)

in other module:
ptr printed (here data is BC 55 36 70 P r a m o d )

Always same 4 byte data is added to beginning. Please let us know about this.


Post exact code because there must be a bug in it. Without detail it’s impossible to tell.

Keep in mind if you are sending a structure that the default GNU behavior is to pad so that the items in the structure are word (4byte) aligned.