CI Tests: fix /tests/Regression/double_free_exploit
* add missing casts to int * add missing includes
This commit is contained in:
parent
9b8bc360e1
commit
82e9f5dfc6
@ -1,6 +1,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(void) {
|
||||
unsigned int *chunk;
|
||||
@ -17,8 +18,8 @@ int main(void) {
|
||||
*/
|
||||
chunk[0] = -0x10; /* prev_size */
|
||||
chunk[1] = 0x8; /* size */
|
||||
chunk[2] = shellcode; /* fd */
|
||||
chunk[3] = shellcode; /* bk */
|
||||
chunk[2] = (int) shellcode; /* fd */
|
||||
chunk[3] = (int) shellcode; /* bk */
|
||||
|
||||
/* set fd to the adres of the return address - 3
|
||||
the minus 3 is needed because fd[3] will become bk
|
||||
|
@ -1,4 +1,7 @@
|
||||
main()
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int *a,*b,*c,*d,*e;
|
||||
b=malloc(8);
|
||||
|
Loading…
Reference in New Issue
Block a user