Merge pull request #630 from Yang1032/fix-1

fix: possible out-of-bounds issues with array access
pull/481/merge
YuQing 2023-04-25 07:46:53 +08:00 committed by GitHub
commit 1b0e3a4710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}