mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Name truncation in TarHeader will always throw ArgumentOutOfRangeException #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SteveXCIV on GitHub (Oct 30, 2014).
The conditional check from lines 65 to 69 of
SharpCompress.Common.Tar.Headers.TarHeaderwill 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 commented on GitHub (Nov 4, 2014):
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.