G
GrahamJWalsh
Hi,
I want to make strcpy cause a core dump;
assuming I have;
char* source = new char[10];
char* dest = new char[10];
sprintf(source, "%s", "ninechars");
followed by;
strcpy(dest, source);
what (if any) chacters ...of any any type can I put into "source" such
that it will crash?
Is the answer staring me in the face? I can't do something like
source =0
or
dest = 0
but instead I have to put a character in the source somewhere.
Cheers
GrahamO
I want to make strcpy cause a core dump;
assuming I have;
char* source = new char[10];
char* dest = new char[10];
sprintf(source, "%s", "ninechars");
followed by;
strcpy(dest, source);
what (if any) chacters ...of any any type can I put into "source" such
that it will crash?
Is the answer staring me in the face? I can't do something like
source =0
or
dest = 0
but instead I have to put a character in the source somewhere.
Cheers
GrahamO