New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 662146 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 417850
issue 661819



Sign in to add a comment

DCHECK hit with UTF-32 encoder and file upload

Project Member Reported by jsb...@chromium.org, Nov 3 2016

Issue description

## Repro:

data:text/html,<form accept-charset="utf-32" method=POST enctype="multipart/form-data"><ol><li><a download="file.txt" href="data:text/plain;charset=utf-8,hello world">download</a><li><input type=file name=q><li><input type=submit value=upload></ol></form>

Follow the steps 1/2/3 - download the file (can be anything, name isn't important), select it, then submit.

## Behavior:

Hits ASSERT:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp?q=TextCodecICU.cpp&sq=package:chromium&dr&l=657

## Reason:

This call:

ucnv_setSubstChars(m_converterICU, "?", 1, &err);

Fails for non-byte-based encodings (UTF-16/32, but we have a custom UTF-16 codec) because it is expecting a full code unit not just 1 byte.

(In release builds, the filename to upload just becomes the empty string; there's no crash.)

(Not technically blocking the linked bugs)
 

Comment 2 Deleted

Status: Fixed (was: Started)

Sign in to add a comment