summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-19 14:28:12 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-19 14:28:12 -0800
commitffc26c26f0ab004fbdb05195e1686d7f33983b06 (patch)
tree9bc8f16d1bc7dc32e924fb5c173a561c03eac3d9 /fpdfsdk/src/fsdk_baseform.cpp
parent11d33361e95d5ea61ee43e4261fa8f53aa372731 (diff)
downloadpdfium-ffc26c26f0ab004fbdb05195e1686d7f33983b06.tar.xz
Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf."
This reverts commit 78353d5dbc0b0c9b2d6946005439a51efa7d108c. Reason for revert Failed tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1719493002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index f05545a672..00ab6c2ef0 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -2461,6 +2461,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf,
return FALSE;
CFX_ByteTextBuf fdfEncodedData;
+
for (FX_DWORD i = 0; i < pFields->GetCount(); i++) {
CPDF_Dictionary* pField = pFields->GetDictAt(i);
if (!pField)
@@ -2472,13 +2473,14 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf,
CFX_WideString csWValue = PDF_DecodeText(csBValue);
CFX_ByteString csValue_b = CFX_ByteString::FromUnicode(csWValue);
- fdfEncodedData << name_b.GetBuffer(name_b.GetLength());
+ fdfEncodedData = fdfEncodedData << name_b.GetBuffer(name_b.GetLength());
name_b.ReleaseBuffer();
- fdfEncodedData << "=";
- fdfEncodedData << csValue_b.GetBuffer(csValue_b.GetLength());
+ fdfEncodedData = fdfEncodedData << "=";
+ fdfEncodedData = fdfEncodedData
+ << csValue_b.GetBuffer(csValue_b.GetLength());
csValue_b.ReleaseBuffer();
if (i != pFields->GetCount() - 1)
- fdfEncodedData << "&";
+ fdfEncodedData = fdfEncodedData << "&";
}
nBufSize = fdfEncodedData.GetLength();