From 82e9f5dfc64db01f3b14e751b4ff661617ed5613 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 10:54:04 +0100 Subject: [PATCH] CI Tests: fix /tests/Regression/double_free_exploit * add missing casts to int * add missing includes --- tests/Regression/double_free_exploit/exploit.c | 9 +++++---- tests/Regression/double_free_exploit/exploit2.c | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/Regression/double_free_exploit/exploit.c b/tests/Regression/double_free_exploit/exploit.c index dfc0420..f2491e2 100644 --- a/tests/Regression/double_free_exploit/exploit.c +++ b/tests/Regression/double_free_exploit/exploit.c @@ -1,6 +1,7 @@ -#include -#include +#include +#include #include +#include 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 diff --git a/tests/Regression/double_free_exploit/exploit2.c b/tests/Regression/double_free_exploit/exploit2.c index b9eb76f..be9f77a 100644 --- a/tests/Regression/double_free_exploit/exploit2.c +++ b/tests/Regression/double_free_exploit/exploit2.c @@ -1,4 +1,7 @@ -main() +#include +#include + +int main() { int *a,*b,*c,*d,*e; b=malloc(8);