Revert "RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits" https://webrtc-codereview.appspot.com/47229004/

Reason for revert: Breaks Chromium FYI compilation

This reverts commit 10022cdeae785187e1d4329042b4ed294c393a16.

BUG=484432
TBR=tommi

Review URL: https://webrtc-codereview.appspot.com/54499004

Cr-Commit-Position: refs/heads/master@{#9247}
diff --git a/webrtc/modules/interface/module_common_types.h b/webrtc/modules/interface/module_common_types.h
index 99730d6..825d7e6 100644
--- a/webrtc/modules/interface/module_common_types.h
+++ b/webrtc/modules/interface/module_common_types.h
@@ -15,9 +15,7 @@
 #include <string.h>  // memcpy
 
 #include <algorithm>
-#include <limits>
 
-#include "webrtc/base/checks.h"
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/common_types.h"
 #include "webrtc/common_video/rotation.h"
@@ -195,17 +193,15 @@
     }
   }
 
-  void VerifyAndAllocateFragmentationHeader(const size_t size) {
-    CHECK(size <= std::numeric_limits<uint16_t>::max());
-    const uint16_t size16 = static_cast<uint16_t>(size);
-    if (fragmentationVectorSize < size16) {
+  void VerifyAndAllocateFragmentationHeader(const uint16_t size) {
+    if (fragmentationVectorSize < size) {
       uint16_t oldVectorSize = fragmentationVectorSize;
       {
         // offset
         size_t* oldOffsets = fragmentationOffset;
-        fragmentationOffset = new size_t[size16];
+        fragmentationOffset = new size_t[size];
         memset(fragmentationOffset + oldVectorSize, 0,
-               sizeof(size_t) * (size16 - oldVectorSize));
+               sizeof(size_t) * (size - oldVectorSize));
         // copy old values
         memcpy(fragmentationOffset, oldOffsets,
                sizeof(size_t) * oldVectorSize);
@@ -214,9 +210,9 @@
       // length
       {
         size_t* oldLengths = fragmentationLength;
-        fragmentationLength = new size_t[size16];
+        fragmentationLength = new size_t[size];
         memset(fragmentationLength + oldVectorSize, 0,
-               sizeof(size_t) * (size16 - oldVectorSize));
+               sizeof(size_t) * (size - oldVectorSize));
         memcpy(fragmentationLength, oldLengths,
                sizeof(size_t) * oldVectorSize);
         delete[] oldLengths;
@@ -224,9 +220,9 @@
       // time diff
       {
         uint16_t* oldTimeDiffs = fragmentationTimeDiff;
-        fragmentationTimeDiff = new uint16_t[size16];
+        fragmentationTimeDiff = new uint16_t[size];
         memset(fragmentationTimeDiff + oldVectorSize, 0,
-               sizeof(uint16_t) * (size16 - oldVectorSize));
+               sizeof(uint16_t) * (size - oldVectorSize));
         memcpy(fragmentationTimeDiff, oldTimeDiffs,
                sizeof(uint16_t) * oldVectorSize);
         delete[] oldTimeDiffs;
@@ -234,14 +230,14 @@
       // payload type
       {
         uint8_t* oldTimePlTypes = fragmentationPlType;
-        fragmentationPlType = new uint8_t[size16];
+        fragmentationPlType = new uint8_t[size];
         memset(fragmentationPlType + oldVectorSize, 0,
-               sizeof(uint8_t) * (size16 - oldVectorSize));
+               sizeof(uint8_t) * (size - oldVectorSize));
         memcpy(fragmentationPlType, oldTimePlTypes,
                sizeof(uint8_t) * oldVectorSize);
         delete[] oldTimePlTypes;
       }
-      fragmentationVectorSize = size16;
+      fragmentationVectorSize = size;
     }
   }