byte - Buffer Overflow strcpy() -


i know how many bytes have overflow run shellcode ?

int fun (char data[256]){ int i; char *tmp;  strcpy(tmp,data);  } 

it known that:

  • if string chain *data larger *tmp there overflow.

  • otherwise there no buffer overflow.

makes general way compiler. exam computer master. must explain 2 cases :

-when *tmp[200] example ,

-when *tmp[300] ie case or *tmp larger *data (no overflows) , *tmp smaller *data (overflow)

how know number of bytes overwhelmed code executes ?


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -