summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_xml_parser.cpp
diff options
context:
space:
mode:
authorBruce Dawson <brucedawson@google.com>2014-11-17 15:22:03 -0800
committerBruce Dawson <brucedawson@google.com>2014-11-17 15:22:03 -0800
commit9ae02acf2f33fc68a6f3c00c3ad86e15725b8941 (patch)
tree9573c098eb605a2d2a2ca967322b01f0c7adea0e /core/src/fxcrt/fx_xml_parser.cpp
parent418f6d0ddd5a1d3e93ebebd34cc42c3134b1bb84 (diff)
downloadpdfium-9ae02acf2f33fc68a6f3c00c3ad86e15725b8941.tar.xz
Zero initialize ch to avoid possible bug - conditions are very subtle.
Whether ch and iRet are read without being initialized depends on complex preconditions and cannot be determined by looking at these function. Therefore it seems prudent to zero initialize them to avoid any risk. BUG=427616 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/727083002
Diffstat (limited to 'core/src/fxcrt/fx_xml_parser.cpp')
-rw-r--r--core/src/fxcrt/fx_xml_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 3608a74a93..26c6540350 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -282,7 +282,7 @@ void CXML_Parser::GetAttrValue(CFX_WideString &value)
return;
}
CFX_UTF8Decoder decoder;
- FX_BYTE mark = 0, ch;
+ FX_BYTE mark = 0, ch = 0;
do {
while (m_dwIndex < m_dwBufferSize) {
ch = m_pBuffer[m_dwIndex];