summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp4
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp10
3 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 5c847fc1df..0a8a59cfda 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -376,7 +376,7 @@ void CPDFSDK_FormFillEnvironment::GotoURL(CPDFXFA_Context* document,
CFX_ByteString bsTo = CFX_WideString(wsURL).UTF16LE_Encode();
FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(wsURL.GetLength());
m_pInfo->FFI_GotoURL(m_pInfo, document, pTo);
- bsTo.ReleaseBuffer();
+ bsTo.ReleaseBuffer(bsTo.GetStringLength());
}
void CPDFSDK_FormFillEnvironment::GetPageViewRect(CPDFXFA_Page* page,
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index c9736126d3..552bb31af2 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -482,10 +482,10 @@ bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf,
CFX_ByteString csValue_b = CFX_ByteString::FromUnicode(csWValue);
fdfEncodedData << name_b.GetBuffer(name_b.GetLength());
- name_b.ReleaseBuffer();
+ name_b.ReleaseBuffer(name_b.GetStringLength());
fdfEncodedData << "=";
fdfEncodedData << csValue_b.GetBuffer(csValue_b.GetLength());
- csValue_b.ReleaseBuffer();
+ csValue_b.ReleaseBuffer(csValue_b.GetStringLength());
if (i != pFields->GetCount() - 1)
fdfEncodedData << "&";
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 7cccd2fb11..c12314f88d 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -976,11 +976,11 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
(FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength());
FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength());
pFormFillEnv->EmailTo(pFileHandler, pTo, pSubject, pCC, pBcc, pMsg);
- bsTo.ReleaseBuffer();
- bsCC.ReleaseBuffer();
- bsBcc.ReleaseBuffer();
- bsSubject.ReleaseBuffer();
- bsMsg.ReleaseBuffer();
+ bsTo.ReleaseBuffer(bsTo.GetStringLength());
+ bsCC.ReleaseBuffer(bsCC.GetStringLength());
+ bsBcc.ReleaseBuffer(bsBcc.GetStringLength());
+ bsSubject.ReleaseBuffer(bsSubject.GetStringLength());
+ bsMsg.ReleaseBuffer(bsMsg.GetStringLength());
} else {
// HTTP or FTP
CFX_WideString ws;