summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 13:00:09 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 13:00:09 +0000
commit8cc4a4af9d4b747c91d2e03d6950b9fe41d4d2d7 (patch)
tree3412cd416e1d2cdb3e29fac296949b5bde94fe53
parent7965592a1fccad22047238bba22650d9092dbde6 (diff)
downloadchromium_src-8cc4a4af9d4b747c91d2e03d6950b9fe41d4d2d7.zip
chromium_src-8cc4a4af9d4b747c91d2e03d6950b9fe41d4d2d7.tar.gz
chromium_src-8cc4a4af9d4b747c91d2e03d6950b9fe41d4d2d7.tar.bz2
Revert 45797 - Apply a sanity limit to objects with width & height.
TEST=NONE BUG=NONE Review URL: http://codereview.chromium.org/1582023 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/1711019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45800 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/common_param_traits.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index b7f13ed..4995b46 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -147,9 +147,6 @@ bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
!m->ReadInt(iter, &w) ||
!m->ReadInt(iter, &h))
return false;
- if (x < 0 || y < 0 || x >= (INT_MAX - w) || y >= (INT_MAX - h) ||
- w < 0 || h < 0 || h >= ((INT_MAX / 16) / (w ? w : 1)))
- return false;
r->set_x(x);
r->set_y(y);
r->set_width(w);
@@ -173,8 +170,6 @@ bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
if (!m->ReadInt(iter, &w) ||
!m->ReadInt(iter, &h))
return false;
- if (w < 0 || h < 0 || h >= ((INT_MAX / 16) / (w ? w : 1)))
- return false;
r->set_width(w);
r->set_height(h);
return true;