-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file_group_count exceeds MAX_FILE_GROUP_COUNT #25
Comments
Interesting. Are you able to share the installation files with me? Increasing MAX_FILE_GROUP_COUNT will make unshield read more "file group" entries, and that will push "component" entries forward and that will cause a crash. These are listed by the g and c commands, respectively. The reason less files are extracted than the file count can be found in the unshield_file_is_valid function. There are a number of cases where a file entry is not actually a file. |
I have sent the entire iso (by torrent) to your email. Using the original
But with the above warning:
The invalid files (shown by a improvised printf call in
And the cases, classified by increasing number in the branches starting at 1:
For the reason 3, |
Got it, thanks! I'll see if I can get it working this weekend! |
Looks like I didn't get it working that weekend... Due to personal time priorities/constraints I need a PR to fix this, if it's still an issue. |
MAX_FILE_GROUP_COUNT seems to only be a limitation of the CabDescriptor, ie: there's a maximum of 70 entry points for the file group offset list. I think that abort() call can be safely removed. I think me and @rodarima might have been analyzing the same files, something related to Renault. :D |
I'm getting trouble extracting a cabinet.
Version from header is 16:
There are 20901 files.
Searching inside the setup.exe:
At lib/component.c on line 53, using gdb,
self->file_group_count
is151
, exceeding theMAX_FILE_GROUP_COUNT
limit set as71
in lib/cabfile.h at line 16.As seen in i6comp at line 34, the max file groups is
512
.Changing the
MAX_FILE_GROUP_COUNT
to 512 produces a segmentation fault:However using the following "patch" on
lib/component.c
, allows to continue on bigfile_group_count
, with the originalMAX_FILE_GROUP_COUNT
set at 71:This patch allows me to extract the cabinet without error, but obviously I have no idea of why.
Using
valgrind
to check buffer overflow (count bigger than MAX), shows no errors:And the number of files is the same as extracted, but not equal to the number of files in the header 20901:
Cabinets are large, in total ~1GB. Any ideas?
The text was updated successfully, but these errors were encountered: