New issue
Advanced search Search tips

Issue 813485 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK failure in Resource::AppendData() when loading an invalid multipart image

Project Member Reported by bashi@chromium.org, Feb 19 2018

Issue description

We are hitting the following DCHECK failure when loading an invalid multipart image.

[1:1:0219/153225.126969:FATAL:Resource.cpp(392)] Check failed: !ErrorOccurred().
#0 0x7f1c5789254c base::debug::StackTrace::StackTrace()
#1 0x7f1c578bc92b logging::LogMessage::~LogMessage()        
#2 0x7f1c4ee69d34 blink::Resource::AppendData()                            
#3 0x7f1c509ba8e1 blink::ImageResource::MultipartDataReceived()
#4 0x7f1c509bf533 blink::MultipartImageResourceParser::AppendData()                 
#5 0x7f1c509b97f1 blink::ImageResource::AppendData()

We shouldn't append data when we've seen an error while receiving multipart image data.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/510ff8e41d9513548ed98c899f6aff07488d9ce3

commit 510ff8e41d9513548ed98c899f6aff07488d9ce3
Author: Kenichi Ishibashi <bashi@chromium.org>
Date: Mon Feb 19 23:06:57 2018

Cancel multipart image parser when decoding failed

Before this CL we didn't stop appending data for mulitpart images
even after there was an decode error. This doesn't align the assumption
the base class has. The base class, Resource, doesn't expect calling
AppendData() when there was an error. We should cancel the parser when
there is a decode error so that we don't append data after the error.

Bug:  813485 
Change-Id: I40112e11bf1d7d1c84e2794c81bbaf178207496f
Reviewed-on: https://chromium-review.googlesource.com/923668
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537689}
[add] https://crrev.com/510ff8e41d9513548ed98c899f6aff07488d9ce3/third_party/WebKit/LayoutTests/http/tests/multipart/invalid-multipart-image.html
[add] https://crrev.com/510ff8e41d9513548ed98c899f6aff07488d9ce3/third_party/WebKit/LayoutTests/http/tests/multipart/resources/invalid-multipart-image.php
[modify] https://crrev.com/510ff8e41d9513548ed98c899f6aff07488d9ce3/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp

Comment 2 by bashi@chromium.org, Feb 20 2018

Status: Fixed (was: Assigned)

Sign in to add a comment