From 80a6cbe0a427e155de8555bc867af745d10f9777 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 12 Apr 2018 19:45:45 +0000 Subject: Return pdfium::span from ByteString::GetBuffer(). Get bounds checking "for free". Change-Id: I7b14cacbc7130ced7b5cb1869b82c96ccff8e642 Reviewed-on: https://pdfium-review.googlesource.com/30451 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- fpdfsdk/cpdfsdk_formfillenvironment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index c1846449cd..262a56e2d1 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -25,7 +25,7 @@ FPDF_WIDESTRING AsFPDFWideString(ByteString* bsUTF16LE) { // to the embedder. Should the embedder modify it by accident, it won't // corrupt other shares of the string beyond |bsUTF16LE|. return reinterpret_cast( - bsUTF16LE->GetBuffer(bsUTF16LE->GetLength())); + bsUTF16LE->GetBuffer(bsUTF16LE->GetLength()).data()); } CPDFSDK_FormFillEnvironment::CPDFSDK_FormFillEnvironment( -- cgit v1.2.3