Skip to content
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

Add support for rar5 sfx files #1585

Merged
merged 1 commit into from Dec 15, 2021
Merged

Conversation

JFranklin13
Copy link
Contributor

Fixes issue #1576

@mmatuska
Copy link
Member

Hi, could you please provide a test for the PR?

@JFranklin13
Copy link
Contributor Author

I'm having trouble creating an sfx archive with the official rar tool but if you can do so that would be great.

@mmatuska
Copy link
Member

mmatuska commented Oct 4, 2021

Hi, I have created a test SFX with a licenced copy of WinRAR.

test.txt.exe.gz

@JFranklin13 JFranklin13 force-pushed the rar5_sfx branch 3 times, most recently from ea0d9fa to cbf34df Compare October 14, 2021 12:11
@JFranklin13
Copy link
Contributor Author

@mmatuska the test was added

Copy link
Member

@mmatuska mmatuska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late answer. Could you please wrap to 80 chars, otherwise it looks good.

rar5_signature(signature);

while (offset + window <= (1024 * 512)) {
const char *buff = __archive_read_ahead(a, offset + window, &bytes_avail);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please wrap to 80 chars?

}
p = buff + offset;
while (p + 8 < buff + bytes_avail) {
if (memcmp(p, signature, sizeof(signature)) == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please wrap to 80 chars?

* like the RAR header.
*/
while (p + 8 < q) {
if (memcmp(p, signature, sizeof(signature)) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please wrap to 80 chars?

@mmatuska
Copy link
Member

@antekone would you have some time to look at this PR?

@mmatuska
Copy link
Member

Ok, lets get it in for starters.

@mmatuska mmatuska merged commit 411284e into libarchive:master Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants