From 92ae2d0c906567ed5733731442bc5e9617d3a9af Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Thu, 17 Oct 2024 08:48:26 +0530 Subject: [PATCH] Update imgRead_replication.c --- .../damn_vulnerable_c_program_shmem/imgRead_replication.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libAFL/damn_vulnerable_c_program_shmem/imgRead_replication.c b/libAFL/damn_vulnerable_c_program_shmem/imgRead_replication.c index bf72717..334979a 100644 --- a/libAFL/damn_vulnerable_c_program_shmem/imgRead_replication.c +++ b/libAFL/damn_vulnerable_c_program_shmem/imgRead_replication.c @@ -58,12 +58,12 @@ int ProcessImage(char* filename){ memcpy(buff1,img.data,sizeof(img.data)); free(buff1); //double free - if (size1/2==0){ + if (size1%2==0){ free(buff1); } else{ //use after free - if(size1/3 == 0){ + if(size1%3 == 0){ buff1[0]='a'; } } @@ -102,7 +102,7 @@ int ProcessImage(char* filename){ free(buff4); } int size4 = img.width * img.height; - if(size4/2==0){ + if(size4%2==0){ //stack exhaustion here stack_operation(); }