From 0186c1817bd1503051597dbcf0b032d4ff1277ab Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 1 Aug 2017 16:20:40 -0400 Subject: Remove support for negative params to ReleaseBuffer() This CL removes the default param value for this method, which was negative. It also adds in a method to get buffer lengths, so that the callsites can explictly passing in the length of the buffer if they were using the default value previously. BUG=pdfium:828 Change-Id: I0170771ee81970b8b601631015ab3e6e39fea8ea Reviewed-on: https://pdfium-review.googlesource.com/9790 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- fpdfsdk/cpdfsdk_formfillenvironment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.cpp') 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, -- cgit v1.2.3