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

Issue 1986453002: Fix binding of null pointer dereference to reference type (Closed)

Created:
4 years, 7 months ago by hans
Modified:
4 years, 7 months ago
Reviewers:
Tom Sepez, dsinclair, Nico, pcc1
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix binding of null pointer dereference to reference type A new Clang warning complains about this, and especially for the function returning a reference, it seems like a bad idea. BUG=none Committed: https://pdfium.googlesource.com/pdfium/+/06f457216f45093dc5dff12055733aa426c26c59

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use Blink/V8-style IMMEDIATE_CRASH instead" #

Total comments: 2

Patch Set 3 : Use PDFIUM_ prefix for the macro #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M core/fxcrt/include/fx_basic.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M core/fxcrt/include/fx_system.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
hans
I figured instead of jumping through hoops to dereference null here, let's just call abort(). ...
4 years, 7 months ago (2016-05-16 17:37:01 UTC) #2
dsinclair
4 years, 7 months ago (2016-05-16 17:39:46 UTC) #4
dsinclair
https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h File core/fxcrt/include/fx_basic.h (right): https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h#newcode296 core/fxcrt/include/fx_basic.h:296: abort(); I don't think this is safe to do. ...
4 years, 7 months ago (2016-05-16 17:41:03 UTC) #5
hans
https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h File core/fxcrt/include/fx_basic.h (right): https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h#newcode296 core/fxcrt/include/fx_basic.h:296: abort(); On 2016/05/16 17:41:02, dsinclair wrote: > I don't ...
4 years, 7 months ago (2016-05-16 17:48:26 UTC) #6
Tom Sepez
https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h File core/fxcrt/include/fx_basic.h (right): https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h#newcode296 core/fxcrt/include/fx_basic.h:296: abort(); On 2016/05/16 17:41:02, dsinclair wrote: > I don't ...
4 years, 7 months ago (2016-05-16 17:49:18 UTC) #7
Nico
https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h File core/fxcrt/include/fx_basic.h (right): https://codereview.chromium.org/1986453002/diff/1/core/fxcrt/include/fx_basic.h#newcode296 core/fxcrt/include/fx_basic.h:296: abort(); On 2016/05/16 17:41:02, dsinclair wrote: > I don't ...
4 years, 7 months ago (2016-05-16 17:49:34 UTC) #8
hans
On 2016/05/16 17:49:34, Nico wrote: > (Maybe this should use something like blink's IMMEDIATE_CRASH instead ...
4 years, 7 months ago (2016-05-16 17:51:52 UTC) #9
hans
Uploaded a version with IMMEDIATE_CRASH(). Please take another look.
4 years, 7 months ago (2016-05-16 18:07:02 UTC) #10
Nico
sorry, bikeshedding: https://codereview.chromium.org/1986453002/diff/20001/core/fxcrt/include/fx_system.h File core/fxcrt/include/fx_system.h (right): https://codereview.chromium.org/1986453002/diff/20001/core/fxcrt/include/fx_system.h#newcode106 core/fxcrt/include/fx_system.h:106: #ifndef IMMEDIATE_CRASH hm, giving this the same ...
4 years, 7 months ago (2016-05-16 18:11:29 UTC) #11
dsinclair
On 2016/05/16 18:11:29, Nico wrote: > sorry, bikeshedding: > > https://codereview.chromium.org/1986453002/diff/20001/core/fxcrt/include/fx_system.h > File core/fxcrt/include/fx_system.h (right): ...
4 years, 7 months ago (2016-05-16 18:14:22 UTC) #12
hans
New patch uploaded. https://codereview.chromium.org/1986453002/diff/20001/core/fxcrt/include/fx_system.h File core/fxcrt/include/fx_system.h (right): https://codereview.chromium.org/1986453002/diff/20001/core/fxcrt/include/fx_system.h#newcode106 core/fxcrt/include/fx_system.h:106: #ifndef IMMEDIATE_CRASH On 2016/05/16 18:11:29, Nico ...
4 years, 7 months ago (2016-05-16 18:22:18 UTC) #13
Nico
lgtm from me
4 years, 7 months ago (2016-05-16 18:29:11 UTC) #14
Tom Sepez
lgtm
4 years, 7 months ago (2016-05-16 18:30:20 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1986453002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1986453002/40001
4 years, 7 months ago (2016-05-16 18:30:26 UTC) #17
hans
On 2016/05/16 18:29:11, Nico wrote: > lgtm from me tsepez: what do you think?
4 years, 7 months ago (2016-05-16 18:30:41 UTC) #18
hans
On 2016/05/16 18:30:41, hans wrote: > On 2016/05/16 18:29:11, Nico wrote: > > lgtm from ...
4 years, 7 months ago (2016-05-16 18:30:58 UTC) #19
Nico
Is the pdfium cq down? https://chromium-cq-status.appspot.com/patch-status/1986453002/40001 has said "pending" for 20 min now.
4 years, 7 months ago (2016-05-16 18:51:31 UTC) #20
hans
On 2016/05/16 18:51:31, Nico wrote: > Is the pdfium cq down? > https://chromium-cq-status.appspot.com/patch-status/1986453002/40001 has said ...
4 years, 7 months ago (2016-05-16 18:52:06 UTC) #21
commit-bot: I haz the power
4 years, 7 months ago (2016-05-16 19:25:49 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://pdfium.googlesource.com/pdfium/+/06f457216f45093dc5dff12055733aa426c2...

Powered by Google App Engine
This is Rietveld 408576698