Skip to content

Commit

Permalink
Update imgRead_replication.c
Browse files Browse the repository at this point in the history
  • Loading branch information
hardik05 authored Oct 17, 2024
1 parent 2a428aa commit 92ae2d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libAFL/damn_vulnerable_c_program_shmem/imgRead_replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 92ae2d0

Please sign in to comment.