mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
Merge pull request #59 from KOLANICH/ZipFileEntry-LoadExtra-ArrayOverflowFix
Zip file entry load extra array overflow fix
This commit is contained in:
@@ -66,7 +66,7 @@ namespace SharpCompress.Common.Zip.Headers
|
||||
|
||||
protected void LoadExtra(byte[] extra)
|
||||
{
|
||||
for (int i = 0; i < extra.Length;)
|
||||
for (int i = 0; i < extra.Length-4;)
|
||||
{
|
||||
ExtraDataType type = (ExtraDataType) BitConverter.ToUInt16(extra, i);
|
||||
if (!Enum.IsDefined(typeof (ExtraDataType), type))
|
||||
|
||||
Reference in New Issue
Block a user