Skip to content

Commit

Permalink
fix: possible out-of-bounds issues with array access
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang1032 committed Apr 24, 2023
1 parent 969cb24 commit c4355d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_upload.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int main(int argc, char **argv)
}
}

if (files[file_index].upload_count >= files[file_index].count)
if (file_index >= FILE_TYPE_COUNT || files[file_index].upload_count >= files[file_index].count)
{
continue;
}
Expand Down

0 comments on commit c4355d1

Please sign in to comment.