Differential D22184 Diff 64134 www/qt5-webengine/files/patch-src_3rdparty_chromium_base_strings_string__number__conversions__unittest.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_base_strings_string__number__conversions__unittest.cc
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/3rdparty/chromium/base/strings/string_number_conversions_unittest.cc.orig 2019-05-23 12:39:34 UTC | |||||
+++ src/3rdparty/chromium/base/strings/string_number_conversions_unittest.cc | |||||
@@ -829,12 +829,21 @@ TEST(StringNumberConversionsTest, DoubleToString) { | |||||
} | |||||
// The following two values were seen in crashes in the wild. | |||||
+#if defined(ARCH_CPU_LITTLE_ENDIAN) | |||||
const char input_bytes[8] = {0, 0, 0, 0, '\xee', '\x6d', '\x73', '\x42'}; | |||||
+#else | |||||
+ const char input_bytes[8] = {'\x42', '\x73', '\x6d', '\xee', 0, 0, 0, 0}; | |||||
+#endif | |||||
double input = 0; | |||||
memcpy(&input, input_bytes, base::size(input_bytes)); | |||||
EXPECT_EQ("1335179083776", NumberToString(input)); | |||||
+#if defined(ARCH_CPU_LITTLE_ENDIAN) | |||||
const char input_bytes2[8] = | |||||
{0, 0, 0, '\xa0', '\xda', '\x6c', '\x73', '\x42'}; | |||||
+#else | |||||
+ const char input_bytes2[8] = | |||||
+ {'\x42', '\x73', '\x6c', '\xda', '\xa0', 0, 0, 0}; | |||||
+#endif | |||||
input = 0; | |||||
memcpy(&input, input_bytes2, base::size(input_bytes2)); | |||||
EXPECT_EQ("1334890332160", NumberToString(input)); |