diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-10 14:36:05 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-10 14:36:05 -0800 |
commit | ad928700bf2dac99148b12f0848fcfab6746ce26 (patch) | |
tree | 2c693c3b2c5ed40e647977ca672fed186fcd3226 | |
parent | 07cafd7e570920810b1589ca30db0a7057b9b6ac (diff) | |
download | pdfium-ad928700bf2dac99148b12f0848fcfab6746ce26.tar.xz |
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 .
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffnotify.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<CXFA_FFWidget*>(
+ reinterpret_cast<CXFA_ContentLayoutItemImpl*>(pSender));
pDocView->DeleteLayoutItem(pWidget);
if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) {
return;
|