| Index: media/formats/mp4/box_reader.h
|
| diff --git a/media/formats/mp4/box_reader.h b/media/formats/mp4/box_reader.h
|
| index d4b608e78f9ea80c76f0dc6c95d20005d9b5c7ce..1ba0294bff3728799749fd862015053ee4b0e0ca 100644
|
| --- a/media/formats/mp4/box_reader.h
|
| +++ b/media/formats/mp4/box_reader.h
|
| @@ -29,7 +29,10 @@ struct MEDIA_EXPORT Box {
|
| class MEDIA_EXPORT BufferReader {
|
| public:
|
| BufferReader(const uint8* buf, const int size)
|
| - : buf_(buf), size_(size), pos_(0) {}
|
| + : buf_(buf), size_(size), pos_(0) {
|
| + CHECK(buf);
|
| + CHECK_GE(size, 0);
|
| + }
|
|
|
| bool HasBytes(int count) { return (pos() + count <= size()); }
|
|
|
|
|