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

Issue 125403003: Fix crash on incorrectly formatted MHTML documents (Closed)

Created:
6 years, 11 months ago by Inactive
Modified:
6 years, 11 months ago
CC:
blink-reviews, Nate Chapin, gavinp+loader_chromium.org, lgombos
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix crash on incorrectly formatted MHTML documents On incorrectly formatted MHTML documents, MHTMLArchive::create() can return null or a MHTMLArchive object whose main resource is null. We had a release assertion to make sure MHTMLArchive::create() does not return null and no null check for the main resource. This was causing us to crash in both cases. This patch adds both null checks and handles them nicely. This patch is based on initial work from Laszlo Gombos <l.gombos@samsung.com>;. R=japhet@chromium.org BUG=331898 TEST=mhtml/invalid-bad-boundary.mht TEST=mhtml/invalid-bad-boundary2.mht Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164584

Patch Set 1 #

Total comments: 2

Patch Set 2 : Take feedback into consideration #

Patch Set 3 : Fix bad previous patchset #

Patch Set 4 : Again #

Patch Set 5 : Again #

Patch Set 6 : Reupload #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -6 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/mhtml/invalid-bad-boundary.mht View 1 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/mhtml/invalid-bad-boundary-expected.txt View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/mhtml/invalid-bad-boundary2.mht View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/mhtml/invalid-bad-boundary2-expected.txt View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentLoader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 3 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Inactive
6 years, 11 months ago (2014-01-06 22:54:17 UTC) #1
Nate Chapin
LGTM. Feel free to ignore the comment if you disagree :) https://codereview.chromium.org/125403003/diff/1/Source/core/loader/DocumentLoader.cpp File Source/core/loader/DocumentLoader.cpp (right): ...
6 years, 11 months ago (2014-01-06 23:04:10 UTC) #2
Inactive
https://codereview.chromium.org/125403003/diff/1/Source/core/loader/DocumentLoader.cpp File Source/core/loader/DocumentLoader.cpp (right): https://codereview.chromium.org/125403003/diff/1/Source/core/loader/DocumentLoader.cpp#newcode289 Source/core/loader/DocumentLoader.cpp:289: if (!isArchiveMIMEType(m_response.mimeType()) || !createArchive()) { On 2014/01/06 23:04:11, Nate ...
6 years, 11 months ago (2014-01-07 00:38:16 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/125403003/270001
6 years, 11 months ago (2014-01-07 09:59:02 UTC) #4
commit-bot: I haz the power
Failed to apply patch for LayoutTests/mhtml/invalid-bad-boundary2.mht: While running patch -p1 --forward --force --no-backup-if-mismatch; A LayoutTests/mhtml/invalid-bad-boundary2.mht ...
6 years, 11 months ago (2014-01-07 09:59:05 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/125403003/340001
6 years, 11 months ago (2014-01-07 13:26:38 UTC) #6
commit-bot: I haz the power
6 years, 11 months ago (2014-01-07 14:31:59 UTC) #7
Message was sent while issue was closed.
Change committed as 164584

Powered by Google App Engine
This is Rietveld 408576698