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

Issue 2046563007: fix null check bugs found by µmix static analyzer (Closed)

Created:
4 years, 6 months ago by lsalzman1
Modified:
4 years, 6 months ago
CC:
reviews_skia.org, caryclark, bungeman-skia
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

A Mozilla developer ran the µmix static analyzer on its codebase and incidentally found some issues regarding null checks in Skia. This fixes the issues that were found. Downstream bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1278452 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046563007 Committed: https://skia.googlesource.com/skia/+/2af4599b5c514933bf997d4837ddaaf24fc61cd7

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M src/pathops/SkPathOpsWinding.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkFontMgr_win_dw.cpp View 3 chunks +3 lines, -3 lines 1 comment Download
M src/utils/win/SkDWriteFontFileStream.cpp View 1 chunk +1 line, -1 line 1 comment Download

Messages

Total messages: 11 (6 generated)
lsalzman1
4 years, 6 months ago (2016-06-08 01:43:03 UTC) #4
mtklein
lgtm FYI Cary and Ben: these look like cases where we've null-checked a pointer after ...
4 years, 6 months ago (2016-06-08 01:56:30 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046563007/1
4 years, 6 months ago (2016-06-08 01:56:43 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/2af4599b5c514933bf997d4837ddaaf24fc61cd7
4 years, 6 months ago (2016-06-08 02:09:06 UTC) #9
reed1
4 years, 6 months ago (2016-06-08 10:35:10 UTC) #11
Message was sent while issue was closed.
Ben, some post-commit comments.

https://codereview.chromium.org/2046563007/diff/1/src/ports/SkFontMgr_win_dw.cpp
File src/ports/SkFontMgr_win_dw.cpp (right):

https://codereview.chromium.org/2046563007/diff/1/src/ports/SkFontMgr_win_dw....
src/ports/SkFontMgr_win_dw.cpp:112: *streamFontFileEnumerator = new
StreamFontFileEnumerator(factory, fontFileLoader);
This seems like a crazy test in the first place -- we NEVER assume that 'new'
will return nullptr. Ben?

https://codereview.chromium.org/2046563007/diff/1/src/utils/win/SkDWriteFontF...
File src/utils/win/SkDWriteFontFileStream.cpp (right):

https://codereview.chromium.org/2046563007/diff/1/src/utils/win/SkDWriteFontF...
src/utils/win/SkDWriteFontFileStream.cpp:142: if (nullptr ==
*streamFontFileStream) {
We NEVER assume 'new' will return nullptr. Can we remove this check?

Powered by Google App Engine
This is Rietveld 408576698