[Webkit-unassigned] [Bug 192805] New: [Win] Fix the wrong return value checking of ScriptItemize in UniscribeController::itemizeShapeAndPlace
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 17 22:59:38 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=192805
Bug ID: 192805
Summary: [Win] Fix the wrong return value checking of
ScriptItemize in
UniscribeController::itemizeShapeAndPlace
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Platform
Assignee: webkit-unassigned at lists.webkit.org
Reporter: Hironori.Fujii at sony.com
[Win] Fix the wrong return value checking of ScriptItemize in UniscribeController::itemizeShapeAndPlace
UniscribeController::itemizeShapeAndPlace has the following code.
> while (rc = ::ScriptItemize(cp, length, m_items.size() - 1, &m_control, &m_state, m_items.data(), &numItems) == E_OUTOFMEMORY) {
> m_items.resize(m_items.size() * 2);
> resetControlAndState();
> }
> if (FAILED(rc)) {
> WTFLogAlways("UniscribeController::itemizeShapeAndPlace: ScriptItemize failed, rc=%lx", rc);
> return;
> }
>
rc is aligned 0 or 1, and checked by FAILED(rc).
'==' has higher operator precedence than '='.
It is interpreted as:
> rc = (::ScriptItemize(...) == E_OUTOFMEMORY)
https://en.cppreference.com/w/cpp/language/operator_precedence
This code has been introduced in Bug 137526.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181218/a0c58d26/attachment-0001.html>
More information about the webkit-unassigned
mailing list