summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 17:00:15 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 17:00:15 +0000
commit9ab379609e4c73d28341f1b0b44c3cfa7d6fc42f (patch)
tree9193b792902a05c8dd30a9f56c89a5692c1fd728
parent3eafbfb9c01b23f85086cb8946700fe8baedb127 (diff)
downloadchromium_src-9ab379609e4c73d28341f1b0b44c3cfa7d6fc42f.zip
chromium_src-9ab379609e4c73d28341f1b0b44c3cfa7d6fc42f.tar.gz
chromium_src-9ab379609e4c73d28341f1b0b44c3cfa7d6fc42f.tar.bz2
Fix test for valid UTF-16 input.
I got this wrong initially; Ningxin wrote a patch to fix it, which agl then also got wrong. So I am relanding Ningxin's original patch. Patch by Ningxin Hu <ningxin.hu@intel.com>. Review URL: http://codereview.chromium.org/3029048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54551 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_sandbox_host_linux.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_sandbox_host_linux.cc b/chrome/browser/renderer_host/render_sandbox_host_linux.cc
index 98e763b..3ba3791 100644
--- a/chrome/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/chrome/browser/renderer_host/render_sandbox_host_linux.cc
@@ -178,7 +178,7 @@ class SandboxIPCProcess {
const char* characters = NULL;
if (characters_bytes > 0) {
const uint32_t kMaxCharactersBytes = 1 << 10;
- if (characters_bytes % 2 == 0 || // We expect UTF-16.
+ if (characters_bytes % 2 != 0 || // We expect UTF-16.
characters_bytes > kMaxCharactersBytes ||
!pickle.ReadBytes(&iter, &characters, characters_bytes))
return;