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

Issue 2535663003: Fix crash in CFDE_CSSSyntaxParser when parsing empty url (Closed)

Created:
4 years ago by npm
Modified:
4 years ago
Reviewers:
Tom Sepez, Wei Li
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix crash in CFDE_CSSSyntaxParser when parsing empty url When parsing "url('')", Subtract() should be called to correctly set m_iDatLen. But iLength will be 0 because there is no url. So I changed the ASSERT. Also replaced some non-const refs with pointers to make the code more readable. BUG=659509 Committed: https://pdfium.googlesource.com/pdfium/+/239915200225fea4c5a02e9630044ef13fccb66d

Patch Set 1 #

Total comments: 4

Patch Set 2 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -41 lines) Patch
M xfa/fde/css/fde_cssdatatable.h View 1 chunk +4 lines, -5 lines 0 comments Download
M xfa/fde/css/fde_cssdatatable.cpp View 1 1 chunk +12 lines, -12 lines 0 comments Download
M xfa/fde/css/fde_cssdeclaration.cpp View 1 chunk +10 lines, -8 lines 0 comments Download
M xfa/fde/css/fde_csssyntax.cpp View 1 3 chunks +10 lines, -16 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
npm
ptal
4 years ago (2016-11-28 19:11:33 UTC) #3
Tom Sepez
lgtm https://codereview.chromium.org/2535663003/diff/1/xfa/fde/css/fde_cssdatatable.cpp File xfa/fde/css/fde_cssdatatable.cpp (right): https://codereview.chromium.org/2535663003/diff/1/xfa/fde/css/fde_cssdatatable.cpp#newcode709 xfa/fde/css/fde_cssdatatable.cpp:709: *iOffset = 1, *iLength -= 2; keep {} ...
4 years ago (2016-11-28 19:24:40 UTC) #4
npm
https://codereview.chromium.org/2535663003/diff/1/xfa/fde/css/fde_cssdatatable.cpp File xfa/fde/css/fde_cssdatatable.cpp (right): https://codereview.chromium.org/2535663003/diff/1/xfa/fde/css/fde_cssdatatable.cpp#newcode709 xfa/fde/css/fde_cssdatatable.cpp:709: *iOffset = 1, *iLength -= 2; On 2016/11/28 19:24:40, ...
4 years ago (2016-11-28 20:35:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2535663003/20001
4 years ago (2016-11-28 20:36:18 UTC) #8
commit-bot: I haz the power
4 years ago (2016-11-28 20:49:32 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/239915200225fea4c5a02e9630044ef13fcc...

Powered by Google App Engine
This is Rietveld 408576698