C++ memcpy problem :(
- by Simon
Hey all :)
I have a problem my src pointer of memcpy is pointing wrong.
unsigned char* lpBuffer is a buffer that contains my bytes, i checked with olly.
The code:
IMAGE_DOS_HEADER iDOSh;
memcpy(&iDOSh,lpBuffer,sizeof(iDOSh));
The problem is that lpBuffer points wrong, output from debugger is
dest = 002859E8 RIGHT
src = 000001D8 FALSE
src is pointing invalid :( i have no idea why
Thanks for reading