What issue did Simon find in the following code?

Simon is going through some of Heather’s code and notices an issue. What issue did Simon find
in the following code?
void f4(void * arg, size_t len)
{
char *buff = new char[100];
C *ptr = new C;
memcpy(buff, arg, len);
ptr->vf();
return;
}

Simon is going through some of Heather’s code and notices an issue. What issue did Simon find
in the following code?
void f4(void * arg, size_t len)
{
char *buff = new char[100];
C *ptr = new C;
memcpy(buff, arg, len);
ptr->vf();
return;
}

A.
Function pointer clobbering

B.
Null-termination

C.
Data pointer modification

D.
Virtual pointer smashing

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *