From 5d3a4c83fc0a41b6b04d8f7022a9db3bc04ba73e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 7 Jan 2015 12:35:20 -0800 Subject: Merge to XFA: Finish unit test for CFX_ByteStringC class. Original CL at https://codereview.chromium.org/808553013 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/837253002 --- core/src/fxcrt/fx_basic_bstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/fxcrt/fx_basic_bstring.cpp') diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp index c54148d799..0d4f860b32 100644 --- a/core/src/fxcrt/fx_basic_bstring.cpp +++ b/core/src/fxcrt/fx_basic_bstring.cpp @@ -1082,7 +1082,7 @@ FX_DWORD CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const if (m_Length == 0) { return 0; } - if (start_pos >= m_Length) { + if (start_pos < 0 || start_pos >= m_Length) { return 0; } FX_DWORD strid = 0; -- cgit v1.2.3