From ad928700bf2dac99148b12f0848fcfab6746ce26 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 10 Nov 2015 14:36:05 -0800 Subject: Fix invalid cast in CXFA_FFNotify::OnLayoutItemRemoving(). There's a re-interpretation followed by a pointer-adjusting static cast required here, not just a blatant re-interpretation. BUG=pdfium:271 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1431313005 . --- xfa/src/fxfa/src/app/xfa_ffnotify.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xfa') diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp index 24b72f8e23..aff2b40d3a 100644 --- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp @@ -605,7 +605,8 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView, CXFA_LayoutItem* pSender, void* pParam, void* pParam2) { - CXFA_FFWidget* pWidget = (CXFA_FFWidget*)pSender; + CXFA_FFWidget* pWidget = static_cast( + reinterpret_cast(pSender)); pDocView->DeleteLayoutItem(pWidget); if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) { return; -- cgit v1.2.3