WebKit Bugzilla
Attachment 357542 Details for
Bug 192805
: [Win] Fix the wrong return value checking of ScriptItemize in UniscribeController::itemizeShapeAndPlace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192805-20181218162442.patch (text/plain), 2.37 KB, created by
Fujii Hironori
on 2018-12-17 23:24:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-17 23:24:43 PST
Size:
2.37 KB
patch
obsolete
>Subversion Revision: 239320 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b5a5d7182d07afbb11c00f16271dea98c32a4d46..384b8e2b22f394cb2cb999556a7a02e4b4fdfbd4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,31 @@ >+2018-12-17 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win] Fix the wrong return value checking of ScriptItemize in UniscribeController::itemizeShapeAndPlace >+ https://bugs.webkit.org/show_bug.cgi?id=192805 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ UniscribeController::itemizeShapeAndPlace has a error check for >+ the return value of ScriptItemize. But, it didn't actually check >+ the return value. >+ >+ The equal comparison '==' has higher operator precedence than the >+ assignment '='. >+ >+ 1. rc = ::ScriptItemize(...) == E_OUTOFMEMORY >+ 2. rc = (::ScriptItemize(...) == E_OUTOFMEMORY) >+ 3. (rc = ::ScriptItemize(...)) == E_OUTOFMEMORY >+ >+ Thus, the expression #1 is same with #2, not #3. >+ >+ Fortunately, as far as I understand the code, there is not an >+ actual problem, and no way to test the coding error. >+ >+ No new tests, no behavior changes. >+ >+ * platform/graphics/win/UniscribeController.cpp: >+ (WebCore::UniscribeController::itemizeShapeAndPlace): Use parentheses to assign 'rc' the return code. >+ > 2018-12-17 Fujii Hironori <Hironori.Fujii@sony.com> > > [Win][Clang] Fix compilation warnings WebCore/platform/graphics directory >diff --git a/Source/WebCore/platform/graphics/win/UniscribeController.cpp b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >index ff37ac56ec16825e65635ca09d0b7a03180df8a4..e732d863a315aabafd297e20b8fb668d241826da 100644 >--- a/Source/WebCore/platform/graphics/win/UniscribeController.cpp >+++ b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >@@ -198,7 +198,7 @@ void UniscribeController::itemizeShapeAndPlace(const UChar* cp, unsigned length, > m_items.resize(6); > int numItems = 0; > HRESULT rc = S_OK; >- while (rc = ::ScriptItemize(cp, length, m_items.size() - 1, &m_control, &m_state, m_items.data(), &numItems) == E_OUTOFMEMORY) { >+ 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(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192805
: 357542 |
358103
|
358104