diff options
author | Stephan Hartmann <sultan@gentoo.org> | 2021-09-08 22:00:12 +0200 |
---|---|---|
committer | Stephan Hartmann <sultan@gentoo.org> | 2021-09-08 22:00:12 +0200 |
commit | 602fbae37ad841fc5f6467cde41b9efdbe506174 (patch) | |
tree | 29cd72dc64a027fab6e0dec8922a4e99eeefd14a /www-client/chromium/files | |
parent | sys-firmware/edk2-ovmf: don't build with -Werror, python bump (diff) | |
download | gentoo-602fbae37ad841fc5f6467cde41b9efdbe506174.tar.gz gentoo-602fbae37ad841fc5f6467cde41b9efdbe506174.tar.bz2 gentoo-602fbae37ad841fc5f6467cde41b9efdbe506174.zip |
www-client/chromium: security cleanup
Bug: https://bugs.gentoo.org/811348
Closes: https://bugs.gentoo.org/698974
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client/chromium/files')
3 files changed, 0 insertions, 167 deletions
diff --git a/www-client/chromium/files/chromium-92-EnumTable-crash.patch b/www-client/chromium/files/chromium-92-EnumTable-crash.patch deleted file mode 100644 index 7fb7360e0269..000000000000 --- a/www-client/chromium/files/chromium-92-EnumTable-crash.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h -index e3130c7..2ad16ea 100644 ---- a/components/cast_channel/enum_table.h -+++ b/components/cast_channel/enum_table.h -@@ -212,7 +212,7 @@ class - - template <typename E> - friend class EnumTable; -- DISALLOW_COPY_AND_ASSIGN(GenericEnumTableEntry); -+ DISALLOW_ASSIGN(GenericEnumTableEntry); - }; - - // Yes, these constructors really needs to be inlined. Even though they look -@@ -250,8 +250,7 @@ class EnumTable { - // Constructor for regular entries. - constexpr Entry(E value, base::StringPiece str) - : GenericEnumTableEntry(static_cast<int32_t>(value), str) {} -- -- DISALLOW_COPY_AND_ASSIGN(Entry); -+ DISALLOW_ASSIGN(Entry); - }; - - static_assert(sizeof(E) <= sizeof(int32_t), -@@ -306,15 +305,14 @@ class EnumTable { - if (is_sorted_) { - const std::size_t index = static_cast<std::size_t>(value); - if (ANALYZER_ASSUME_TRUE(index < data_.size())) { -- const auto& entry = data_.begin()[index]; -+ const auto& entry = data_[index]; - if (ANALYZER_ASSUME_TRUE(entry.has_str())) - return entry.str(); - } - return absl::nullopt; - } - return GenericEnumTableEntry::FindByValue( -- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()), -- data_.size(), static_cast<int32_t>(value)); -+ &data_[0], data_.size(), static_cast<int32_t>(value)); - } - - // This overload of GetString is designed for cases where the argument is a -@@ -342,8 +340,7 @@ class EnumTable { - // enum value directly. - absl::optional<E> GetEnum(base::StringPiece str) const { - auto* entry = GenericEnumTableEntry::FindByString( -- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()), -- data_.size(), str); -+ &data_[0], data_.size(), str); - return entry ? static_cast<E>(entry->value) : absl::optional<E>(); - } - -@@ -358,7 +355,7 @@ class EnumTable { - // Align the data on a cache line boundary. - alignas(64) - #endif -- std::initializer_list<Entry> data_; -+ const std::vector<Entry> data_; - bool is_sorted_; - - constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted) -@@ -370,8 +367,8 @@ class EnumTable { - - for (std::size_t i = 0; i < data.size(); i++) { - for (std::size_t j = i + 1; j < data.size(); j++) { -- const Entry& ei = data.begin()[i]; -- const Entry& ej = data.begin()[j]; -+ const Entry& ei = data[i]; -+ const Entry& ej = data[j]; - DCHECK(ei.value != ej.value) - << "Found duplicate enum values at indices " << i << " and " << j; - DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str())) diff --git a/www-client/chromium/files/chromium-92-crashpad-consent.patch b/www-client/chromium/files/chromium-92-crashpad-consent.patch deleted file mode 100644 index 956d19eee234..000000000000 --- a/www-client/chromium/files/chromium-92-crashpad-consent.patch +++ /dev/null @@ -1,46 +0,0 @@ -From dad7c5dc4504aa66c39f2a38b3c563d18dd1395a Mon Sep 17 00:00:00 2001 -From: Andrey Lushnikov <lushnikov@chromium.org> -Date: Mon, 12 Jul 2021 18:47:01 +0000 -Subject: [PATCH] Respect stat collection consent for crashpad user metrics collection - -With this patch, crashpad will no longer collect metrics if there is no -user consent for stats collections. - -This is a follow-up to the discussion in https://crrev.com/c/2923889 - -BUG=1210598 - -Change-Id: I1eceaa10f9d09f95b74cb4a2d2eac03008ec5b40 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999433 -Reviewed-by: Mark Mentovai <mark@chromium.org> -Reviewed-by: Greg Thompson <grt@chromium.org> -Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org> -Cr-Commit-Position: refs/heads/master@{#900573} ---- - -diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc -index cd9a053..b34ad0d 100644 ---- a/chrome/app/chrome_crash_reporter_client.cc -+++ b/chrome/app/chrome_crash_reporter_client.cc -@@ -144,6 +144,8 @@ - #if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) - bool ChromeCrashReporterClient::GetCrashMetricsLocation( - base::FilePath* metrics_dir) { -+ if (!GetCollectStatsConsent()) -+ return false; - return base::PathService::Get(chrome::DIR_USER_DATA, metrics_dir); - } - #endif // defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) -diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc -index 474bf8e..2a66a3aa 100644 ---- a/chrome/app/chrome_crash_reporter_client_win.cc -+++ b/chrome/app/chrome_crash_reporter_client_win.cc -@@ -160,6 +160,8 @@ - - bool ChromeCrashReporterClient::GetCrashMetricsLocation( - std::wstring* metrics_dir) { -+ if (!GetCollectStatsConsent()) -+ return false; - install_static::GetUserDataDirectory(metrics_dir, nullptr); - return !metrics_dir->empty(); - } diff --git a/www-client/chromium/files/chromium-freetype-2.11.patch b/www-client/chromium/files/chromium-freetype-2.11.patch deleted file mode 100644 index aee6dc82e980..000000000000 --- a/www-client/chromium/files/chromium-freetype-2.11.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp -+++ b/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp -@@ -712,7 +712,11 @@ void colrv1_draw_paint(SkCanvas* canvas, - canvas->drawPaint(colrPaint); - break; - } -+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 -+ case FT_COLR_PAINTFORMAT_TRANSFORM: -+#else - case FT_COLR_PAINTFORMAT_TRANSFORMED: -+#endif - case FT_COLR_PAINTFORMAT_TRANSLATE: - case FT_COLR_PAINTFORMAT_ROTATE: - case FT_COLR_PAINTFORMAT_SKEW: -@@ -759,10 +763,17 @@ void colrv1_transform(SkCanvas* canvas, FT_Face face, FT_COLR_Paint colrv1_paint - SkMatrix transform; - - switch (colrv1_paint.format) { -+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 -+ case FT_COLR_PAINTFORMAT_TRANSFORM: { -+ transform = ToSkMatrix(colrv1_paint.u.transform.affine); -+ break; -+ } -+#else - case FT_COLR_PAINTFORMAT_TRANSFORMED: { - transform = ToSkMatrix(colrv1_paint.u.transformed.affine); - break; - } -+#endif - case FT_COLR_PAINTFORMAT_TRANSLATE: { - transform = SkMatrix::Translate( - SkFixedToScalar(colrv1_paint.u.translate.dx), -@@ -880,10 +891,17 @@ bool colrv1_traverse_paint(SkCanvas* canvas, - traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID, - FT_COLOR_NO_ROOT_TRANSFORM); - break; -+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11 -+ case FT_COLR_PAINTFORMAT_TRANSFORM: -+ colrv1_transform(canvas, face, paint); -+ traverse_result = colrv1_traverse_paint(canvas, palette, face, -+ paint.u.transform.paint, visited_set); -+#else - case FT_COLR_PAINTFORMAT_TRANSFORMED: - colrv1_transform(canvas, face, paint); - traverse_result = colrv1_traverse_paint(canvas, palette, face, - paint.u.transformed.paint, visited_set); -+#endif - break; - case FT_COLR_PAINTFORMAT_TRANSLATE: - colrv1_transform(canvas, face, paint); |