Skip to content

Commit

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

0 comments on commit dc2d5ba

Please sign in to comment.