Skip to content

Commit

Permalink
Do not abort if MAX_FILE_GROUP_COUNT exceeded
Browse files Browse the repository at this point in the history
MAX_FILE_GROUP_COUNT limits the number of file group offset
lists inside the CabDescriptor.

Components do not have the same limitations, as the file group
count is specified in the header.
  • Loading branch information
Demon000 committed Jun 13, 2024
1 parent d6d883a commit a3f54a1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/component.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ UnshieldComponent* unshield_component_new(Header* header, uint32_t offset)
}

self->file_group_count = READ_UINT16(p); p += 2;
if (self->file_group_count > MAX_FILE_GROUP_COUNT)
abort();

self->file_group_names = NEW(const char*, self->file_group_count);

file_group_table_offset = READ_UINT32(p); p += 4;
Expand Down

0 comments on commit a3f54a1

Please sign in to comment.