Avoids crashes in allocators when fuzzers or maliciously
crafted streams make elements appear extremely large.
BUG=b/68352235
Change-Id: I71c293d8abdff0d188a881c4366bc09182ac32f8
tc * scale could overflow theoretically (as it did in a fuzzed
file). The return -1 isn't really well defined, but that'll
probably do given this this is an extreme outlier case.
BUG=b/64953172
Change-Id: Id4aba673c3f85dee6ee25cc5f4b2db73b30ca8b3
replace assert with a check of the pointer, this is a public function so
should be tolerant of invalid parameters
BUG=webm:1415
Change-Id: I28a3a2ef905d62f11928dbbe54c119411d2b1f74
this path has been error checked since:
986b64b mkvparser: Add error checking in Block::Parse.
BUG=webm:1405
Change-Id: I1c17c05076455f25ab888555d71d7b27c032e9dd
FLT_MIN is the smallest finite value (numeric_limits::min()) -FLT_MAX is
the correct for the most negative (numeric_limits::lowest())
http://en.cppreference.com/w/cpp/types/numeric_limits
BUG=b/36255773
BUG=webm:1381
Change-Id: Iaaff611acffc3df28fef12af81ac5299791f0148
PrimaryChromaticity::Parse never owns the PrimaryChromaticity
it allocates-- avoid freeing it because doing so results in a
double free when the MasteringMetadata dtor runs.
BUG=webm:1381
Change-Id: Ief0159f6ab667234e3fdc51c65f23ef5efb32a71
Some run times return NULL pointers when creating 0 length
arrays. Avoid the inconsistency by skipping allocation when
the length of the SeekHead entry or void element array
is 0.
BUG=webm:1313
Change-Id: I28b4eac1d3e0ba968147637883f6e37c089e8573
- Store actual element ID in SeekHead::Entry id field (instead
of a decoded EBML int, which is completely _wrong_).
- Add a SeekHead::Entry constructor so we get initialized values
in SeekHead::Entry's when parsing an Entry fails.
Change-Id: I152fae54628cb84918917139dba0cd0b42a44a57
MSVC C4996 triggers upon use of functions like fopen, and suggests
use of non-portable Microsoft replacements. Disable it project wide,
and remove the pragmas littered throughout the tree.
Change-Id: I8b890bbfd3cd7224c25350bd28f334facd8b7783
Wrapping mkvmuxer and mkvparser in the libwebm namespace is no
longer necessary now that the tree reorganization is complete.
Put mkvmuxer and mkvparser namespaces back in the global
namespace to avoid unnecessary churn in downstream code.
Change-Id: I13a4fe0143d20bb2bb6038078c68636ff2af0c29
- Use .cc and .h everywhere.
- Update includes/include guards.
- Remove extra makefile targets necessitated by previous mix
of cpp/cc.
Change-Id: I7aad29152d4177937f8f42927c16c6572228c104