From 753daeba8b2e0e1fb4fba4a77c02373d25ef4822 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 1 Sep 2025 23:20:19 +0100 Subject: [PATCH] [ARC] Disable check of nulls in filename, field is not filled with zeros on write. --- Aaru.Archives/Arc/Info.cs | 18 ------------------ Aaru.Archives/Arc/Open.cs | 9 --------- 2 files changed, 27 deletions(-) diff --git a/Aaru.Archives/Arc/Info.cs b/Aaru.Archives/Arc/Info.cs index 4c25cf07f..e161aca51 100644 --- a/Aaru.Archives/Arc/Info.cs +++ b/Aaru.Archives/Arc/Info.cs @@ -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; diff --git a/Aaru.Archives/Arc/Open.cs b/Aaru.Archives/Arc/Open.cs index 3f62b45d3..3482b7c61 100644 --- a/Aaru.Archives/Arc/Open.cs +++ b/Aaru.Archives/Arc/Open.cs @@ -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;