| Index: printing/pdf_metafile_skia.cc
|
| ===================================================================
|
| --- printing/pdf_metafile_skia.cc (revision 177853)
|
| +++ printing/pdf_metafile_skia.cc (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include "base/hash_tables.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/posix/eintr_wrapper.h"
|
| +#include "base/safe_numerics.h"
|
| #include "skia/ext/vector_platform_device_skia.h"
|
| #include "third_party/skia/include/core/SkData.h"
|
| #include "third_party/skia/include/core/SkRefCnt.h"
|
| @@ -110,7 +111,7 @@
|
| }
|
|
|
| uint32 PdfMetafileSkia::GetDataSize() const {
|
| - return data_->pdf_stream_.getOffset();
|
| + return base::checked_numeric_cast<uint32>(data_->pdf_stream_.getOffset());
|
| }
|
|
|
| bool PdfMetafileSkia::GetData(void* dst_buffer,
|
| @@ -238,7 +239,8 @@
|
| return NULL;
|
|
|
| PdfMetafileSkia* metafile = new PdfMetafileSkia;
|
| - metafile->InitFromData(data->bytes(), data->size());
|
| + metafile->InitFromData(data->bytes(),
|
| + base::checked_numeric_cast<uint32>(data->size()));
|
| return metafile;
|
| }
|
|
|
|
|