Package: chromium / 73.0.3683.75-1~deb9u1

disable/unrar.patch Patch series | 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
description: disable support for safe browsing inspection of rar files
author: Michael Gilbert <mgilbert@debian.org>
bug: http://bugs.debian.org/914487

--- a/chrome/common/safe_browsing/BUILD.gn
+++ b/chrome/common/safe_browsing/BUILD.gn
@@ -64,41 +64,6 @@ if (safe_browsing_mode == 1) {
     ]
   }
 
-  source_set("rar_analyzer") {
-    sources = [
-      "rar_analyzer.cc",
-      "rar_analyzer.h",
-    ]
-
-    deps = [
-      ":archive_analyzer_results",
-      ":download_type_util",
-      ":file_type_policies",
-      "//base",
-      "//base:i18n",
-      "//components/safe_browsing:features",
-      "//third_party/unrar:unrar",
-    ]
-
-    defines = [
-      "_FILE_OFFSET_BITS=64",
-      "LARGEFILE_SOURCE",
-      "RAR_SMP",
-      "SILENT",
-
-      # The following is set to disable certain macro definitions in the unrar
-      # source code.
-      "CHROMIUM_UNRAR",
-
-      # Disables exceptions in unrar, replaces them with process termination.
-      "UNRAR_NO_EXCEPTIONS",
-    ]
-
-    public_deps = [
-      "//components/safe_browsing:csd_proto",
-    ]
-  }
-
   source_set("disk_image_type_sniffer_mac") {
     sources = [
       "disk_image_type_sniffer_mac.cc",
@@ -167,7 +132,6 @@ source_set("safe_browsing") {
       ":archive_analyzer_results",
       ":binary_feature_extractor",
       ":download_type_util",
-      ":rar_analyzer",
       "//components/safe_browsing:features",
     ]
 
--- a/chrome/services/file_util/safe_archive_analyzer.cc
+++ b/chrome/services/file_util/safe_archive_analyzer.cc
@@ -7,7 +7,6 @@
 #include "base/macros.h"
 #include "build/build_config.h"
 #include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
 #include "chrome/common/safe_browsing/zip_analyzer.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
@@ -50,8 +49,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
                                          AnalyzeRarFileCallback callback) {
   DCHECK(rar_file.IsValid());
 
+  LOG(FATAL) << "AnalyzeRarFile is disabled in this build";
   safe_browsing::ArchiveAnalyzerResults results;
-  safe_browsing::rar_analyzer::AnalyzeRarFile(
-      std::move(rar_file), std::move(temporary_file), &results);
   std::move(callback).Run(results);
 }
--- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
+++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
@@ -100,7 +100,7 @@ void FileAnalyzer::Start(const base::Fil
   if (inspection_type == DownloadFileType::ZIP) {
     StartExtractZipFeatures();
   } else if (inspection_type == DownloadFileType::RAR) {
-    StartExtractRarFeatures();
+    LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build";
 #if defined(OS_MACOSX)
   } else if (inspection_type == DownloadFileType::DMG) {
     StartExtractDmgFeatures();