Skip to content

Commit

Permalink
Update third_party/libwebm to commit b4f01ea
Browse files Browse the repository at this point in the history
Includes two commits:
  Check if long long may possibly be > LONG_MAX
    Fix Coverity defect CID 1616730: Logically dead code (DEADCODE).

  mkvparser.cc: remove redundant float.h include

Change-Id: I166595fddb2494b18618cb7d255f7693c6d06321
  • Loading branch information
wantehchang committed Jan 14, 2025
1 parent 94a8a21 commit 95c4bf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion third_party/libwebm/mkvparser/mkvparser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "mkvparser/mkvparser.h"

#if defined(_MSC_VER) && _MSC_VER < 1800
#include <float.h> // _isnan() / _finite()
#define MSC_COMPAT
#endif

Expand Down Expand Up @@ -7891,8 +7890,10 @@ long Block::Parse(const Cluster* pCluster) {
if (frame_size <= 0)
return E_FILE_FORMAT_INVALID;

#if LLONG_MAX > LONG_MAX
if (frame_size > LONG_MAX)
return E_FILE_FORMAT_INVALID;
#endif

if ((pos + len) > stop)
return E_FILE_FORMAT_INVALID;
Expand Down Expand Up @@ -7958,8 +7959,10 @@ long Block::Parse(const Cluster* pCluster) {
if (frame_size <= 0)
return E_FILE_FORMAT_INVALID;

#if LLONG_MAX > LONG_MAX
if (frame_size > LONG_MAX)
return E_FILE_FORMAT_INVALID;
#endif

curr.len = static_cast<long>(frame_size);
// Check if size + curr.len could overflow.
Expand Down

0 comments on commit 95c4bf0

Please sign in to comment.