From 35ae65d5d04dc3fc75a635c90c5aa9bb1eda3812 Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Fri, 11 Aug 2017 14:00:50 -0400 Subject: SkSafeMath for tracking size_t overflow Do multiply (mul) and add while tracking that the calculation does not overflow, which can be checked with ok(). The new unit test shows a couple examples. Author: Herb Derby Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3 Reviewed-on: https://skia-review.googlesource.com/33721 Reviewed-by: Mike Klein Commit-Queue: Herb Derby --- gn/tests.gni | 1 + 1 file changed, 1 insertion(+) (limited to 'gn') diff --git a/gn/tests.gni b/gn/tests.gni index 26bdc94745..c2f3759cd2 100644 --- a/gn/tests.gni +++ b/gn/tests.gni @@ -191,6 +191,7 @@ tests_sources = [ "$_tests/RoundRectTest.cpp", "$_tests/RRectInPathTest.cpp", "$_tests/RTreeTest.cpp", + "$_tests/SafeMathTest.cpp", "$_tests/ScalarTest.cpp", "$_tests/ScaleToSidesTest.cpp", "$_tests/SerializationTest.cpp", -- cgit v1.2.3