diff options
author | Oliver Chang <ochang@chromium.org> | 2016-01-13 21:49:20 -0800 |
---|---|---|
committer | Oliver Chang <ochang@chromium.org> | 2016-01-13 21:49:20 -0800 |
commit | 8694bf8ac331d9a94d62d86465d599eee54486d0 (patch) | |
tree | 45dcbc35c776edd5b979b51e418d040326116a79 /core | |
parent | 783709f76baf7893b7334209fe89d947acd6369d (diff) | |
download | pdfium-8694bf8ac331d9a94d62d86465d599eee54486d0.tar.xz |
Fix another invalidated iterator issue while traversing CPDF_Dictionary.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1582903004 .
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fpdfdoc/doc_formcontrol.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp index 6c3d1ec9c4..bf37d85195 100644 --- a/core/src/fpdfdoc/doc_formcontrol.cpp +++ b/core/src/fpdfdoc/doc_formcontrol.cpp @@ -64,9 +64,11 @@ void CPDF_FormControl::SetOnStateName(const CFX_ByteString& csOn) { if (!pSubDict) continue; - for (const auto& subdict_it : *pSubDict) { - const CFX_ByteString& csKey2 = subdict_it.first; - CPDF_Object* pObj2 = subdict_it.second; + auto subdict_it = pSubDict->begin(); + while (subdict_it != pSubDict->end()) { + const CFX_ByteString& csKey2 = subdict_it->first; + CPDF_Object* pObj2 = subdict_it->second; + ++subdict_it; if (!pObj2) { continue; } |