diff options
author | weili <weili@chromium.org> | 2016-06-03 14:06:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-03 14:06:36 -0700 |
commit | 8d4e0d47f4cd0325be84ebf310fd8de989761939 (patch) | |
tree | 7ce5f43aef4c0091852612bbe53ecbfe9e51a7a1 /xfa/fwl/core/cfwl_widgetmgr.cpp | |
parent | b71dc76df4a1eb04f89a64cd542a1d585df3251e (diff) | |
download | pdfium-8d4e0d47f4cd0325be84ebf310fd8de989761939.tar.xz |
Fix more bugs found by /analyze tool
Three more bugs are discovered:
-- potientially used freed pointer;
-- potientially used uninitialized variable;
-- Used '&&' instead of bitwise operator '&'
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2040503002
Diffstat (limited to 'xfa/fwl/core/cfwl_widgetmgr.cpp')
-rw-r--r-- | xfa/fwl/core/cfwl_widgetmgr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp index 90d621477a..78d8206369 100644 --- a/xfa/fwl/core/cfwl_widgetmgr.cpp +++ b/xfa/fwl/core/cfwl_widgetmgr.cpp @@ -768,8 +768,7 @@ FX_BOOL CFWL_WidgetMgrDelegate::IsNeedRepaint(IFWL_Widget* pWidget, FX_BOOL bOrginPtIntersectWidthDirty = rtDirty.Contains(rtWidget.left, rtWidget.top); static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints]; - int32_t iSize = sizeof(FWL_NEEDREPAINTHITDATA); - FXSYS_memset(hitPoint, 0, iSize); + FXSYS_memset(hitPoint, 0, sizeof(hitPoint)); FX_FLOAT fxPiece = rtWidget.width / kNeedRepaintHitPiece; FX_FLOAT fyPiece = rtWidget.height / kNeedRepaintHitPiece; hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left; |