fix: possible out-of-bounds issues with array access

pull/630/head
maogen.ymg 2023-04-24 17:19:29 +08:00
parent 969cb24400
commit c4355d126a
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;
}