Code: long Track::Create(
    Segment* pSegment,
    const Info& info,
    long long element_start,
    long long element_size,
    Track*& pResult)
{
    if (pResult)
        return -1;
 
    Track* const pTrack = new (std::nothrow) Track(pSegment,
                                                   element_start,
                                                   element_size);
 
    if (pTrack == NULL)
        return -1;  //generic error
 
    const int status = info.Copy(pTrack->m_info);
 
    if (status)  // error
    {
        delete pTrack;
        return status;
    }
 
    pResult = pTrack;
    return 0;  //success
 }

Commit Message: libwebm: Pull from upstream

Rolling mkvparser from upstream. Primarily for fixing a bug on parsing
failures with certain Opus WebM files.

Upstream commit hash of this pull: 574045edd4ecbeb802ee3f1d214b5510269852ae

The diff is so huge because there were some style clean ups upstream.
But it was ensured that there were no breaking changes when the style
clean ups was done upstream.

Change-Id: Ib6e907175484b4b0ae1b55ab39522ea3188ad039
CWE ID: CWE-119
long Track::Create(
Track::Info::Info()
    : uid(0),
      defaultDuration(0),
      codecDelay(0),
      seekPreRoll(0),
      nameAsUTF8(NULL),
      language(NULL),
      codecId(NULL),
      codecNameAsUTF8(NULL),
      codecPrivate(NULL),
      codecPrivateSize(0),
      lacing(false) {}
 
Track::Info::~Info() { Clear(); }
 
void Track::Info::Clear() {
  delete[] nameAsUTF8;
  nameAsUTF8 = NULL;
 
  delete[] language;
  language = NULL;
 
  delete[] codecId;
  codecId = NULL;
 
  delete[] codecPrivate;
  codecPrivate = NULL;
  codecPrivateSize = 0;

  delete[] codecNameAsUTF8;
  codecNameAsUTF8 = NULL;
 }
