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

verify RAR crc on header and file data #220

Merged
merged 1 commit into from Apr 7, 2017

Conversation

Projects
None yet
2 participants
@coderb
Contributor

coderb commented Apr 4, 2017

verify rar file crc checksums:

  • header records
  • decompressed file payload

tested and works with:

  • typical rar files
  • rar files with encrypted headers
  • multipart rar files
@coderb

This comment has been minimized.

Show comment
Hide comment
@coderb

coderb Apr 4, 2017

Contributor

Hi Adam,

I haven't used cake at all and am still on VS 2015. Can you help me figure out which test file is failing on the AppVeyor build? I looks like something fails and causes a cascade of errors.

Thanks,
Brien

Contributor

coderb commented Apr 4, 2017

Hi Adam,

I haven't used cake at all and am still on VS 2015. Can you help me figure out which test file is failing on the AppVeyor build? I looks like something fails and causes a cascade of errors.

Thanks,
Brien

@adamhathcock

This comment has been minimized.

Show comment
Hide comment
@adamhathcock

adamhathcock Apr 4, 2017

Owner

If you look at the AppVeyor output, it will show the failing unit test names: https://ci.appveyor.com/project/adamhathcock/sharpcompress/build/0.15.120

I haven't converted this to VS2017 csproj from VS2015 project JSON so you should be fine. I think the xunit tests should still work with VS2015.

You can run the tests just by running the powershell script .\build.ps1

Owner

adamhathcock commented Apr 4, 2017

If you look at the AppVeyor output, it will show the failing unit test names: https://ci.appveyor.com/project/adamhathcock/sharpcompress/build/0.15.120

I haven't converted this to VS2017 csproj from VS2015 project JSON so you should be fine. I think the xunit tests should still work with VS2015.

You can run the tests just by running the powershell script .\build.ps1

@coderb

This comment has been minimized.

Show comment
Hide comment
@coderb

coderb Apr 4, 2017

Contributor

sorry to seem clueless, but i've only ever used *.csproj files and my vs2015 won't load the test project which is xproj/json.

Contributor

coderb commented Apr 4, 2017

sorry to seem clueless, but i've only ever used *.csproj files and my vs2015 won't load the test project which is xproj/json.

@adamhathcock

This comment has been minimized.

Show comment
Hide comment
@adamhathcock

adamhathcock Apr 4, 2017

Owner

Download the VS2015 tooling from here: https://www.microsoft.com/net/download/core

Owner

adamhathcock commented Apr 4, 2017

Download the VS2015 tooling from here: https://www.microsoft.com/net/download/core

@coderb

This comment has been minimized.

Show comment
Hide comment
@coderb

coderb Apr 4, 2017

Contributor

i found the issue which turned up a (minor?) bug in the existing code.
The bug is that RarCryptoBinaryReader buffers bytes from the underlying stream and the CurrentReadByteCount is being updated to match the buffered consumption rather than the end use.

I will repush a commit when i get the code cleaned up. My fix requires CurrentReadByteCount and Mark to become virtual. Are you ok with that or would you like to attempt to refactor differently?

Contributor

coderb commented Apr 4, 2017

i found the issue which turned up a (minor?) bug in the existing code.
The bug is that RarCryptoBinaryReader buffers bytes from the underlying stream and the CurrentReadByteCount is being updated to match the buffered consumption rather than the end use.

I will repush a commit when i get the code cleaned up. My fix requires CurrentReadByteCount and Mark to become virtual. Are you ok with that or would you like to attempt to refactor differently?

@coderb

This comment has been minimized.

Show comment
Hide comment
@coderb

coderb Apr 4, 2017

Contributor

ok, i confirmed the existing bug. without the CurrentReadByteCount fix the extended time may not be read in FileHeader.ReadFromReader() which also borks the crc.

Contributor

coderb commented Apr 4, 2017

ok, i confirmed the existing bug. without the CurrentReadByteCount fix the extended time may not be read in FileHeader.ReadFromReader() which also borks the crc.

@coderb

This comment has been minimized.

Show comment
Hide comment
@coderb

coderb Apr 4, 2017

Contributor

hurray, appveyor is happy! adam- i'm done for now. please review and supply feedback if there are any changes you want made prior to merging. cheers, b!

(btw, i use this library heavily and am very appreciative of it's existence! thanks for the hard work!)

Contributor

coderb commented Apr 4, 2017

hurray, appveyor is happy! adam- i'm done for now. please review and supply feedback if there are any changes you want made prior to merging. cheers, b!

(btw, i use this library heavily and am very appreciative of it's existence! thanks for the hard work!)

@adamhathcock adamhathcock merged commit 58b4fe4 into adamhathcock:master Apr 7, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment