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

Issue 718103002: detect bad bitmaps during deserialization (Closed)

Created:
6 years, 1 month ago by reed1
Modified:
6 years, 1 month ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

detect bad bitmaps during deserialization BUG=skia:3117 Committed: https://skia.googlesource.com/skia/+/ac6a2f964ee9821df6a4a8f3c46796322a4c37b8

Patch Set 1 #

Total comments: 1

Patch Set 2 : return true (but empty) if we just didn't recognize the codec type #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -3 lines) Patch
M src/core/SkPictureData.cpp View 3 chunks +10 lines, -3 lines 2 comments Download
M src/core/SkReadBuffer.cpp View 1 1 chunk +5 lines, -0 lines 6 comments Download

Messages

Total messages: 21 (8 generated)
reed1
I presume this won't "break" other pictures that used to try to continue with empty ...
6 years, 1 month ago (2014-11-12 16:17:02 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/718103002/1
6 years, 1 month ago (2014-11-12 16:17:58 UTC) #4
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 1 month ago (2014-11-12 16:17:59 UTC) #5
mtklein
lgtm https://codereview.chromium.org/718103002/diff/1/src/core/SkPictureData.cpp File src/core/SkPictureData.cpp (right): https://codereview.chromium.org/718103002/diff/1/src/core/SkPictureData.cpp#newcode398 src/core/SkPictureData.cpp:398: /* Should we use SkValidatingReadBuffer instead? */ Yeah, ...
6 years, 1 month ago (2014-11-12 16:20:15 UTC) #7
reed1
Ravi, can you try applying this patch and see if it indeed fixes the issues ...
6 years, 1 month ago (2014-11-12 16:31:06 UTC) #8
reed1
6 years, 1 month ago (2014-11-12 16:49:09 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/718103002/20001
6 years, 1 month ago (2014-11-12 17:04:06 UTC) #13
rmistry
On 2014/11/12 16:31:06, reed1 wrote: > Ravi, can you try applying this patch and see ...
6 years, 1 month ago (2014-11-12 17:12:40 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/718103002/20001
6 years, 1 month ago (2014-11-12 17:25:16 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/ac6a2f964ee9821df6a4a8f3c46796322a4c37b8
6 years, 1 month ago (2014-11-12 17:25:28 UTC) #18
rmistry
On 2014/11/12 17:12:40, rmistry wrote: > On 2014/11/12 16:31:06, reed1 wrote: > > Ravi, can ...
6 years, 1 month ago (2014-11-12 17:27:12 UTC) #19
scroggo
https://codereview.chromium.org/718103002/diff/20001/src/core/SkPictureData.cpp File src/core/SkPictureData.cpp (right): https://codereview.chromium.org/718103002/diff/20001/src/core/SkPictureData.cpp#newcode398 src/core/SkPictureData.cpp:398: /* Should we use SkValidatingReadBuffer instead? */ If we're ...
6 years, 1 month ago (2014-11-12 18:24:48 UTC) #20
reed1
6 years, 1 month ago (2014-11-12 19:25:20 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/718103002/diff/20001/src/core/SkReadBuffer.cpp
File src/core/SkReadBuffer.cpp (right):

https://codereview.chromium.org/718103002/diff/20001/src/core/SkReadBuffer.cp...
src/core/SkReadBuffer.cpp:262: "Could not decode bitmap. Resulting bitmap will
be red.");
On 2014/11/12 18:24:48, scroggo wrote:
> I think this error message is well out of date.

Yea, esp. the RED part. I will update.

https://codereview.chromium.org/718103002/diff/20001/src/core/SkReadBuffer.cp...
src/core/SkReadBuffer.cpp:264: // intact, so we return true with an empty
bitmap, so we don't for an abort of the
On 2014/11/12 18:24:48, scroggo wrote:
> force* ?

Acknowledged.

https://codereview.chromium.org/718103002/diff/20001/src/core/SkReadBuffer.cp...
src/core/SkReadBuffer.cpp:273: // just throw this guy away
On 2014/11/12 18:24:48, scroggo wrote:
> This will fall through and return false. With the change in SkPictureData.cpp,
> this means we'll abort the picture, right? Does this mean that older SKPs may
> not work anymore? Is that okay?

This is effectively dead code, which I will clean up later. legacyUnflatten()
crashes, so we never actually return from it.

Powered by Google App Engine
This is Rietveld 408576698