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

Name truncation in TarHeader will always throw ArgumentOutOfRangeException #22

Open
SteveXCIV opened this issue Oct 30, 2014 · 1 comment

Comments

@SteveXCIV
Copy link

The conditional check from lines 65 to 69 of SharpCompress.Common.Tar.Headers.TarHeader will always result in an ArgumentOutOfRangeException on line 67.

The signature is of substring is String.Substring(int startIndex, int length), but this line uses the length of the Name property as the length argument, instead of the difference between length and the start index.

Didn't think this needed it's own fork/merge because it's a one-liner, but I don't know if this usage appears anywhere else.

@adamhathcock
Copy link
Owner

If you could do a quick Pull Request, that would be great. I'm just very busy these days and even devoting brain power is rough for me.

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

No branches or pull requests

2 participants