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
Conversation
f420198
to
d45d87e
Compare
Hi, could you please provide a test for the PR? |
I'm having trouble creating an sfx archive with the official rar tool but if you can do so that would be great. |
Hi, I have created a test SFX with a licenced copy of WinRAR. |
ea0d9fa
to
cbf34df
Compare
@mmatuska the test was added |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
@antekone would you have some time to look at this PR? |
Ok, lets get it in for starters. |
Fixes issue #1576