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

Issue 1273853004: Fix bmp RLE "bug" and add invalid image test to CodexTest (Closed)

Created:
5 years, 4 months ago by msarett
Modified:
5 years, 4 months ago
Reviewers:
scroggo, emmaleer
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix bmp RLE "bug" Chromium's test suite contains an RLE image that reports a certain file size in the header, but then contains additional encoded data. Our bmp decoder would only decode half of the image, before stopping. With this fix, we check for additional data before returning kIncompleteInput. If this lands, I will upload the test image to the bots. Also adding an invalid image test to CodexTest. BUG=skia: Committed: https://skia.googlesource.com/skia/+/d0375bc4607f9d3f2ec427771e90ec7d284c174d

Patch Set 1 #

Total comments: 14

Patch Set 2 : Response to comments plus final nits from 1258863008 #

Total comments: 14

Patch Set 3 : Rebase #

Patch Set 4 : Response to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -28 lines) Patch
A + resources/invalid_images/mask-bmp-ico.ico View 1 2 Binary file 0 comments Download
M src/codec/SkBmpCodec.cpp View 1 2 3 3 chunks +6 lines, -4 lines 0 comments Download
M src/codec/SkBmpRLECodec.h View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M src/codec/SkBmpRLECodec.cpp View 1 2 3 6 chunks +60 lines, -13 lines 0 comments Download
M tests/CodexTest.cpp View 1 2 3 2 chunks +13 lines, -11 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (3 generated)
msarett
5 years, 4 months ago (2015-08-06 22:41:23 UTC) #2
scroggo
https://codereview.chromium.org/1273853004/diff/1/src/codec/SkBmpRLECodec.cpp File src/codec/SkBmpRLECodec.cpp (right): https://codereview.chromium.org/1273853004/diff/1/src/codec/SkBmpRLECodec.cpp#newcode191 src/codec/SkBmpRLECodec.cpp:191: size_t remainingBytes = fRLEBytes - fCurrRLEByte; This can be ...
5 years, 4 months ago (2015-08-07 13:35:35 UTC) #3
msarett
https://codereview.chromium.org/1273853004/diff/1/src/codec/SkBmpRLECodec.cpp File src/codec/SkBmpRLECodec.cpp (right): https://codereview.chromium.org/1273853004/diff/1/src/codec/SkBmpRLECodec.cpp#newcode191 src/codec/SkBmpRLECodec.cpp:191: size_t remainingBytes = fRLEBytes - fCurrRLEByte; On 2015/08/07 13:35:35, ...
5 years, 4 months ago (2015-08-11 22:35:03 UTC) #4
scroggo
What are the "final nits from 1258863008"? Anything that should be added to the change ...
5 years, 4 months ago (2015-08-12 14:14:30 UTC) #5
msarett
https://codereview.chromium.org/1273853004/diff/20001/src/codec/SkBmpCodec.cpp File src/codec/SkBmpCodec.cpp (right): https://codereview.chromium.org/1273853004/diff/20001/src/codec/SkBmpCodec.cpp#newcode497 src/codec/SkBmpCodec.cpp:497: // This line should be unreachable, since we require ...
5 years, 4 months ago (2015-08-12 15:01:25 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1273853004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1273853004/60001
5 years, 4 months ago (2015-08-12 15:02:07 UTC) #9
commit-bot: I haz the power
5 years, 4 months ago (2015-08-12 15:09:00 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/d0375bc4607f9d3f2ec427771e90ec7d284c174d

Powered by Google App Engine
This is Rietveld 408576698