summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_data.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-07-19 13:19:12 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-07-19 20:59:29 +0000
commit33b42e4ab56d56ff02cd08a47c5f590875d886bf (patch)
treed168b57aa48373a3213f918471fcd1c8224d2d5d /xfa/fxfa/parser/cxfa_data.cpp
parentd4c401194137f3f7f466f6daaa7fe3ffb4b6cd53 (diff)
downloadpdfium-33b42e4ab56d56ff02cd08a47c5f590875d886bf.tar.xz
Rename StringCs c_str() to unterminated_c_str().
Since there is no guarantee of termination if the StringC was extracted from a snippet of another string. Make it more obvious that things like strlen(str.unterminated_c_str()) might be a bad idea. Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2 Reviewed-on: https://pdfium-review.googlesource.com/8170 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_data.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_data.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp
index bdfc25c79c..7bf18a5d3e 100644
--- a/xfa/fxfa/parser/cxfa_data.cpp
+++ b/xfa/fxfa/parser/cxfa_data.cpp
@@ -17,7 +17,7 @@ FX_ARGB CXFA_Data::ToColor(const CFX_WideStringC& wsValue) {
return 0xff000000;
int cc = 0;
- const wchar_t* str = wsValue.c_str();
+ const wchar_t* str = wsValue.unterminated_c_str();
int len = wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len)
cc++;