Fix memcpy() call for big endian
https://bugs.webkit.org/show_bug.cgi?id=197945

Patch by Eike Rathke <erack@redhat.com> on 2019-05-16
Reviewed by Michael Catanzaro.

* wtf/Packed.h:
(WTF::alignof):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@245395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index a8c99e2..6efab37 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,13 @@
+2019-05-16  Eike Rathke  <erack@redhat.com>
+
+        Fix memcpy() call for big endian
+        https://bugs.webkit.org/show_bug.cgi?id=197945
+
+        Reviewed by Michael Catanzaro.
+
+        * wtf/Packed.h:
+        (WTF::alignof):
+
 2019-05-15  Ross Kirsling  <ross.kirsling@sony.com>
 
         [PlayStation] WTFCrash should preserve register state.
diff --git a/Source/WTF/wtf/Packed.h b/Source/WTF/wtf/Packed.h
index fb8815f..c5abdba 100644
--- a/Source/WTF/wtf/Packed.h
+++ b/Source/WTF/wtf/Packed.h
@@ -149,7 +149,7 @@
 #if CPU(LITTLE_ENDIAN)
         memcpy(m_storage.data(), &value, storageSize);
 #else
-        memcpy(m_storage.data(), bitwise_cast<uint8_t*>(&value) + (sizeof(void*) - storageSize));
+        memcpy(m_storage.data(), bitwise_cast<uint8_t*>(&value) + (sizeof(void*) - storageSize), storageSize);
 #endif
     }