summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_checkbox.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-06-13 14:04:02 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-15 18:28:02 +0000
commit6a3fc45b9e238d9b7b601cb13be664391d393b42 (patch)
tree69182b8517f5ecea3ebe24f46fa72b43d70a7f26 /fpdfsdk/formfiller/cffl_checkbox.cpp
parent65a55343e623924c9c3bbbd953097cf7fd0f5fc6 (diff)
downloadpdfium-6a3fc45b9e238d9b7b601cb13be664391d393b42.tar.xz
Add more checks for destroyed annotations in CFFL_FormFiller.
CFFL_FormFiller::CommitData() should check more rigorously and so should its callers. BUG=chromium:732051 Change-Id: If0cee8fb61de10dc7678dad89c330d75bee55aa4 Reviewed-on: https://pdfium-review.googlesource.com/6530 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_checkbox.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index d8227d8760..a81458e92d 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -61,8 +61,7 @@ bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true))
pWnd->SetCheck(!pWnd->IsChecked());
- CommitData(pPageView, nFlags);
- return true;
+ return CommitData(pPageView, nFlags);
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
@@ -81,8 +80,7 @@ bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView,
pWnd->SetCheck(!pWidget->IsChecked());
}
- if (!CommitData(pPageView, nFlags))
- return false;
+ return CommitData(pPageView, nFlags);
}
return true;