From 73322074658e19ff14591236d9b5485910a2c7b7 Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Tue, 21 Jun 2011 21:19:41 +0000 Subject: Fix some problems detected by coverity. - Uninitialized class member in GSCanonicalEntry and SkPDFDocument. - Incorrect sign extension in SkPDFFont. - Dead code in SkPDFUtils. CID=16262,16272,16273,16275 Review URL: http://codereview.appspot.com/4659041 git-svn-id: http://skia.googlecode.com/svn/trunk@1668 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pdf/SkPDFFont.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pdf/SkPDFFont.cpp') diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 277ed12ac3..f570a1f51a 100755 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -47,7 +47,8 @@ bool parsePFBSection(const uint8_t** src, size_t* len, int sectionType, if (*len < 6) return false; - *size = buf[2] | (buf[3] << 8) | (buf[4] << 16) | (buf[5] << 24); + *size = (size_t)buf[2] | ((size_t)buf[3] << 8) | ((size_t)buf[4] << 16) | + ((size_t)buf[5] << 24); size_t consumed = *size + 6; if (consumed > *len) return false; -- cgit v1.2.3