From dc2d5ba7687853f1841797263d02d9bea46e77ac Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Thu, 17 Oct 2024 08:46:45 +0530 Subject: [PATCH] Update imgRead.c --- libAFL/damn_vulnerable_c_program_git/imgRead.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libAFL/damn_vulnerable_c_program_git/imgRead.c b/libAFL/damn_vulnerable_c_program_git/imgRead.c index c0997c2..984ca35 100644 --- a/libAFL/damn_vulnerable_c_program_git/imgRead.c +++ b/libAFL/damn_vulnerable_c_program_git/imgRead.c @@ -52,12 +52,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'; } }