[ARC] Disable check of nulls in filename, field is not filled with zeros on write.

This commit is contained in:
2025-09-01 23:20:19 +01:00
parent 6665d9545e
commit 753daeba8b
2 changed files with 0 additions and 27 deletions

View File

@@ -38,15 +38,6 @@ public sealed partial class Arc
return false;
}
for(int i = 0; i < 11; i++)
// Not a valid filename character
if(header.filename[i] > 0 && header.filename[i] < 0x20)
return false;
// If the filename is not 8.3, it's probably not an ARC file, but maybe it is in MVS/UNIX?
if(header.filename[11] != 0) return false;
// Compressed size is larger than file size
// Hope for the best
return header.compressed < stream.Length;
@@ -95,15 +86,6 @@ public sealed partial class Arc
return;
}
for(int i = 0; i < 11; i++)
// Not a valid filename character
if(header.filename[i] > 0 && header.filename[i] < 0x20)
return;
// If the filename is not 8.3, it's probably not an ARC file, but maybe it is in MVS/UNIX?
if(header.filename[11] != 0) return;
// Compressed size is larger than file size
if(header.compressed >= stream.Length) return;

View File

@@ -42,15 +42,6 @@ public sealed partial class Arc
return ErrorNumber.InvalidArgument;
}
// Not a valid filename character
for(int i = 0; i < 11; i++)
{
if(header.filename[i] > 0 && header.filename[i] < 0x20) return ErrorNumber.InvalidArgument;
}
// If the filename is not 8.3, it's probably not an ARC file, but maybe it is in MVS/UNIX?
if(header.filename[11] != 0) return ErrorNumber.InvalidArgument;
// Compressed size is larger than file size
// Hope for the best
if(header.compressed >= _stream.Length && (int)header.method != 31) return ErrorNumber.InvalidArgument;