diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:54:47 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:54:47 +0000 |
commit | 3aad1a37affb1ab70d1897f2b03eb8c077264984 (patch) | |
tree | 3ecce65ff47a6fd964eaf8e556588bdbc6d60465 /gpu/command_buffer/service/texture_manager.cc | |
parent | 07c674cd5a7d9f79cd2be1d04437bf97717f79a0 (diff) | |
download | chromium_src-3aad1a37affb1ab70d1897f2b03eb8c077264984.zip chromium_src-3aad1a37affb1ab70d1897f2b03eb8c077264984.tar.gz chromium_src-3aad1a37affb1ab70d1897f2b03eb8c077264984.tar.bz2 |
Fix SafeAdd and SafeMultiply
BUG=145648,145544
Review URL: https://chromiumcodereview.appspot.com/10916165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/texture_manager.cc')
-rw-r--r-- | gpu/command_buffer/service/texture_manager.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index 574107c..41fea80 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc @@ -359,10 +359,10 @@ bool TextureManager::TextureInfo::ValidForTexture( if (level >= 0 && face_index < level_infos_.size() && static_cast<size_t>(level) < level_infos_[face_index].size()) { const LevelInfo& info = level_infos_[GLTargetToFaceIndex(face)][level]; - GLint right; - GLint top; - return SafeAdd(xoffset, width, &right) && - SafeAdd(yoffset, height, &top) && + int32 right; + int32 top; + return SafeAddInt32(xoffset, width, &right) && + SafeAddInt32(yoffset, height, &top) && xoffset >= 0 && yoffset >= 0 && right <= info.width && |