Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: media/formats/mp4/box_definitions.cc

Issue 1189073004: Properly verify that input data is just 'pssh' boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« media/cdm/cenc_utils_unittest.cc ('K') | « media/cdm/cenc_utils_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/box_definitions.cc
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc
index 72809cfdffdd542a7c97b2563f97bb935bc79779..9dfbf52cb5f8fc5e8fb86a2e9631ce704b067d9d 100644
--- a/media/formats/mp4/box_definitions.cc
+++ b/media/formats/mp4/box_definitions.cc
@@ -26,7 +26,9 @@ ProtectionSystemSpecificHeader::~ProtectionSystemSpecificHeader() {}
FourCC ProtectionSystemSpecificHeader::BoxType() const { return FOURCC_PSSH; }
bool ProtectionSystemSpecificHeader::Parse(BoxReader* reader) {
- // Don't bother validating the box's contents.
+ // Don't bother validating the box's contents other than type().
ddorwin 2015/06/25 23:08:17 It's not "don't bother" - it's Fail if not the cor
jrummell 2015/06/30 00:06:03 The "don't bother" is in relation to all the other
+ RCHECK(reader->type() == BoxType());
+
// Copy the entire box, including the header, for passing to EME as initData.
DCHECK(raw_box.empty());
raw_box.assign(reader->data(), reader->data() + reader->size());
« media/cdm/cenc_utils_unittest.cc ('K') | « media/cdm/cenc_utils_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698