c90bbb3be9
* fix crash in nsImapProtocol::CreateNewLineFromSocket (bmo#1667120) - Mozilla Thunderbird 78.3.0 MFSA 2020-44 (bsc#1176756) * CVE-2020-15677 (bmo#1641487) Download origin spoofing via redirect * CVE-2020-15676 (bmo#1646140) XSS when pasting attacker-controlled data into a contenteditable element * CVE-2020-15678 (bmo#1660211) When recursing through layers while scrolling, an iterator may have become invalid, resulting in a potential use-after- free scenario * CVE-2020-15673 (bmo#1648493, bmo#1660800) Memory safety bugs fixed in Thunderbird 78.3 - requires NSPR >= 4.25.1 - removed obsolete thunderbird-bmo1664607.patch - Mozilla Thunderbird 78.2.2 https://www.thunderbird.net/en-US/thunderbird/78.2.2/releasenotes - added thunderbird-bmo1664607.patch required for builds w/o updater (boo#1176384) - Mozilla Thunderbird 78.2.1 * based on Mozilla's 78 ESR codebase * many new and changed features https://www.thunderbird.net/en-US/thunderbird/78.0/releasenotes/#whatsnew * built-in OpenPGP support (enigmail neither required nor supported) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=549
89 lines
3.3 KiB
Diff
89 lines
3.3 KiB
Diff
# HG changeset patch
|
|
# Parent 0e579dcbf7328dda4512cbdafc9b42acec4935ea
|
|
Skia does not support big endian. The places to fix are too numerous and upstream (skia, not Mozilla)
|
|
has no interest in maintaining big endian.
|
|
So here we try to swizzle the input for skia, so that skia always works on LE, and when it comes
|
|
out again, we transform back to BE.
|
|
|
|
diff -r 0e579dcbf732 gfx/2d/ConvolutionFilter.cpp
|
|
--- a/gfx/2d/ConvolutionFilter.cpp Wed Jan 08 12:17:44 2020 +0100
|
|
+++ b/gfx/2d/ConvolutionFilter.cpp Wed Jan 08 12:17:49 2020 +0100
|
|
@@ -35,9 +35,38 @@
|
|
return true;
|
|
}
|
|
|
|
+static void ByteSwapArray(uint8_t *u8Array, int32_t size) {
|
|
+ uint32_t *array = reinterpret_cast<uint32_t*>(u8Array);
|
|
+ for (int pxl = 0; pxl < size; ++pxl) {
|
|
+ // Use an endian swap to move the bytes, i.e. BGRA -> ARGB.
|
|
+ uint32_t rgba = array[pxl];
|
|
+ array[pxl] = NativeEndian::swapToLittleEndian(rgba);
|
|
+ }
|
|
+}
|
|
+
|
|
void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst,
|
|
bool aHasAlpha) {
|
|
+#if MOZ_BIG_ENDIAN()
|
|
+ int outputSize = mFilter->numValues();
|
|
+
|
|
+ // Input size isn't handed in, so we have to calculate it quickly
|
|
+ int inputSize = 0;
|
|
+ for (int xx = 0; xx < outputSize; ++xx) {
|
|
+ // Get the filter that determines the current output pixel.
|
|
+ int filterOffset, filterLength;
|
|
+ mFilter->FilterForValue(xx, &filterOffset, &filterLength);
|
|
+ inputSize = std::max(inputSize, filterOffset + filterLength);
|
|
+ }
|
|
+
|
|
+ ByteSwapArray((uint8_t*)aSrc, inputSize);
|
|
+#endif
|
|
+
|
|
SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha);
|
|
+
|
|
+#if MOZ_BIG_ENDIAN()
|
|
+ ByteSwapArray((uint8_t*)aSrc, inputSize);
|
|
+ ByteSwapArray(aDst, outputSize);
|
|
+#endif
|
|
}
|
|
|
|
void ConvolutionFilter::ConvolveVertically(uint8_t* const* aSrc, uint8_t* aDst,
|
|
@@ -49,8 +78,26 @@
|
|
int32_t filterLength;
|
|
auto filterValues =
|
|
mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength);
|
|
+
|
|
+#if MOZ_BIG_ENDIAN()
|
|
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
|
+ // Skia only knows LE, so we have to swizzle the input
|
|
+ ByteSwapArray(aSrc[filterY], aRowSize);
|
|
+ }
|
|
+#endif
|
|
+
|
|
SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst,
|
|
aHasAlpha);
|
|
+
|
|
+#if MOZ_BIG_ENDIAN()
|
|
+ // After skia is finished, we swizzle back to BE, in case
|
|
+ // the input is used again somewhere else
|
|
+ for (int filterY = 0; filterY < filterLength; filterY++) {
|
|
+ ByteSwapArray(aSrc[filterY], aRowSize);
|
|
+ }
|
|
+ // The destination array as well
|
|
+ ByteSwapArray(aDst, aRowSize);
|
|
+#endif
|
|
}
|
|
|
|
/* ConvolutionFilter::ComputeResizeFactor is derived from Skia's
|
|
diff -r 0e579dcbf732 gfx/skia/skia/include/core/SkPreConfig.h
|
|
--- a/gfx/skia/skia/include/core/SkPreConfig.h Wed Jan 08 12:17:44 2020 +0100
|
|
+++ b/gfx/skia/skia/include/core/SkPreConfig.h Wed Jan 08 12:17:49 2020 +0100
|
|
@@ -73,7 +73,7 @@
|
|
defined(__ppc__) || defined(__hppa) || \
|
|
defined(__PPC__) || defined(__PPC64__) || \
|
|
defined(_MIPSEB) || defined(__ARMEB__) || \
|
|
- defined(__s390__) || \
|
|
+ defined(__s390__) || defined(__s390x__) || \
|
|
(defined(__sh__) && defined(__BIG_ENDIAN__)) || \
|
|
(defined(__ia64) && defined(__BIG_ENDIAN__))
|
|
#define SK_CPU_BENDIAN
|