File: Update-expected-string-MIME-type-for-libmagic.patch

package info (click to toggle)
yara 4.2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,896 kB
  • sloc: ansic: 40,856; yacc: 2,661; lex: 1,880; cpp: 863; makefile: 467; javascript: 85; sh: 47; python: 35
file content (26 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Hilko Bengen <bengen@debian.org>
Date: Tue, 27 Dec 2022 13:46:51 +0100
Subject: Update expected string, MIME type for libmagic

---
 tests/test-magic.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/test-magic.c b/tests/test-magic.c
index ff2f34c..4b63b9f 100644
--- a/tests/test-magic.c
+++ b/tests/test-magic.c
@@ -23,8 +23,11 @@ int main(int argc, char** argv)
 
   assert_true_rule_blob(
       "import \"magic\" rule test { condition: \
-      magic.type() contains \"MS-DOS executable\" and \
-      magic.mime_type() == \"application/x-dosexec\" }",
+      ( magic.type() contains \"MS-DOS executable\" or \
+        magic.type() contains \"PE32 executable\" or \
+        magic.type() contains \"PE32+ executable\" ) and                                                      \
+      ( magic.mime_type() == \"application/x-dosexec\" or \
+        magic.mime_type() == \"application/vnd.microsoft.portable-executable\" ) }",
       PE32_FILE);
 
   // Test case for https://github.com/VirusTotal/yara/issues/1663