]> git.nihav.org Git - nihav.git/commitdiff
nihav_registry/detect: improve MacBinary II MOV detection
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Feb 2026 16:58:36 +0000 (17:58 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 2 Feb 2026 16:58:36 +0000 (17:58 +0100)
nihav-registry/src/detect.rs

index 63db8c4e7ccd11bd41f23ea26b09521a5f3b80c2..41702ed6998e27f5d133c94386a8f311150d7392 100644 (file)
@@ -251,7 +251,7 @@ const DETECTORS: &[DetectConditions] = &[
                       CheckItem{offs: 0x41, cond: &CC::Str(b"MooV")},
                       CheckItem{offs: 0x7A, cond: &CC::Eq(Arg::Byte(0x81))},
                       CheckItem{offs: 0x7B, cond: &CC::Eq(Arg::Byte(0x81))},
-                      CheckItem{offs: 0x84, cond: &CC::Str(b"mdat")}],
+                      CheckItem{offs: 0x84, cond: &CC::Or(&CC::Str(b"mdat"), &CC::Str(b"moov"))}],
     },
     DetectConditions {
         demux_name: "mov-resfork",