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

Issue 1061493002: Prevent DM crash in the PDF sink when src width/height are zero. (Closed)

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

Description

Prevent DM crash in the PDF sink when src width/height are zero. Committed: https://skia.googlesource.com/skia/+/2ab9000b3fa1a61ec9213408af9c800f70eb0657

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M dm/DMSrcSink.cpp View 1 chunk +3 lines, -0 lines 1 comment Download

Messages

Total messages: 9 (2 generated)
djsollen
5 years, 8 months ago (2015-04-03 13:31:13 UTC) #2
hal.canary
lgtm
5 years, 8 months ago (2015-04-03 13:32:08 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1061493002/1
5 years, 8 months ago (2015-04-03 13:32:17 UTC) #5
djsollen
https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp File dm/DMSrcSink.cpp (right): https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp#newcode365 dm/DMSrcSink.cpp:365: return "SkDocument::beginPage(w,h) returned NULL"; I think it may be ...
5 years, 8 months ago (2015-04-03 13:35:01 UTC) #6
mtklein
On 2015/04/03 13:35:01, djsollen wrote: > https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp > File dm/DMSrcSink.cpp (right): > > https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp#newcode365 > ...
5 years, 8 months ago (2015-04-03 13:37:12 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/2ab9000b3fa1a61ec9213408af9c800f70eb0657
5 years, 8 months ago (2015-04-03 13:38:35 UTC) #8
scroggo
5 years, 8 months ago (2015-04-03 14:20:53 UTC) #9
Message was sent while issue was closed.
On 2015/04/03 13:37:12, mtklein wrote:
> On 2015/04/03 13:35:01, djsollen wrote:
> > https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp
> > File dm/DMSrcSink.cpp (right):
> > 
> >
https://codereview.chromium.org/1061493002/diff/1/dm/DMSrcSink.cpp#newcode365
> > dm/DMSrcSink.cpp:365: return "SkDocument::beginPage(w,h) returned NULL";
> > I think it may be better if we could just produce an empty pdf which would
map
> > to what other backends do.
> 
> We're not going to want to look at that empty pdf, but we don't want to count
> this as an error either.  So, generate a non-fatal error?

Isn't it an error though? It's not a PDF error, but it seems like an error if we
failed to decode. (Or if we decoded a 0, 0 image and thought it was a success?)
Perhaps we should catch the error before here?

I think this is at least a good place to start though, since it keeps us from
crashing...

Powered by Google App Engine
This is Rietveld 408576698