mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[ARC] Disable check of nulls in filename, field is not filled with zeros on write.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user