diff options
author | benjaminwagner <benjaminwagner@google.com> | 2015-12-04 08:48:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-04 08:48:26 -0800 |
commit | 886e5e41db5d6d42368f225785013c9308dc66bc (patch) | |
tree | e168d7240ec06966d6469f5821e38b537e45bb71 /src/codec/SkBmpCodec.cpp | |
parent | be8216a922241cc8f3ea3b813608fcb06936fde0 (diff) |
Fix overflow caught by ASAN.
BUG=skia:
Review URL: https://codereview.chromium.org/1498923002
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r-- | src/codec/SkBmpCodec.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index aff54021a7..580ff25ddd 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -550,19 +550,6 @@ int32_t SkBmpCodec::getDstRow(int32_t y, int32_t height) const { return height - y - 1; } -/* - * Compute the number of colors in the color table - */ -uint32_t SkBmpCodec::computeNumColors(uint32_t numColors) { - // Zero is a default for maxColors - // Also set numColors to maxColors when it is too large - uint32_t maxColors = 1 << fBitsPerPixel; - if (numColors == 0 || numColors >= maxColors) { - return maxColors; - } - return numColors; -} - SkCodec::Result SkBmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) { if (!conversion_possible(dstInfo, this->getInfo())) { |