Skip to content

Commit 30a249e

Browse files
committed
fix: Removed .Jpg EndsWithAnyOf check
- removed the bytecheck at the end of the file, because a valid jpg file does not match with the given file-end-byte-sequences from the validator - the affected file has the end-byte-sequence 0x27 0xe7 0x44
1 parent 23842aa commit 30a249e

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • MagicBytesValidator/Formats

MagicBytesValidator/Formats/Jpg.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ public Jpg() : base(
1313
* - Image data must stop with trailer 0xFF 0xD9
1414
* - JPEG may contain metadata after trailer.
1515
* - Currently available: Samsung specific metadata (ending on "SEFT") */
16-
17-
// TODO: We might remove the `EndsWithAnyOf` as metadata can be quite diverse.
16+
1817
StartsWith([0xFF, 0xD8, 0xFF])
19-
.Anywhere([0xFF, 0xD9])
20-
.EndsWithAnyOf([
21-
[0xFF, 0xD9],
22-
[0x53, 0x45, 0x46, 0x54]
23-
]);
18+
.Anywhere([0xFF, 0xD9]);
2419
}
2520
}

0 commit comments

Comments
 (0)