mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-27 11:23:01 +00:00
Fixed length in TarHeader#WriteStringBytes
This commit is contained in:
@@ -181,7 +181,7 @@ namespace SharpCompress.Common.Tar.Headers
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length - 1 && i < name.Length; ++i)
|
||||
for (i = 0; i < length && i < name.Length; ++i)
|
||||
{
|
||||
buffer[offset + i] = (byte)name[i];
|
||||
}
|
||||
@@ -272,4 +272,4 @@ namespace SharpCompress.Common.Tar.Headers
|
||||
|
||||
public string Magic { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user