Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp

Issue 1814563002: wtf/CheckedArithmetic.h delegates to base/numerics/safe_math.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert new check Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
index cbaebda358615c27d1986d0d6ef5d73659ef3543..d66b38ae71e3ac99b7656dfdf2a64da6bb225934 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -27,6 +27,7 @@
#include "SkMatrixConvolutionImageFilter.h"
#include "platform/graphics/filters/SkiaImageFilterBuilder.h"
#include "platform/text/TextStream.h"
+#include "wtf/CheckedNumeric.h"
#include "wtf/OwnPtr.h"
namespace blink {
@@ -122,7 +123,7 @@ bool FEConvolveMatrix::parametersValid() const
if (m_kernelSize.isEmpty())
return false;
uint64_t kernelArea = m_kernelSize.area();
- if (!WTF::isInBounds<int>(kernelArea))
+ if (!CheckedNumeric<int>(kernelArea).IsValid())
return false;
if (safeCast<size_t>(kernelArea) != m_kernelMatrix.size())
return false;

Powered by Google App Engine
This is Rietveld 408576698