summaryrefslogtreecommitdiff
path: root/test/meson.build
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2021-08-15 16:13:15 +0930
committerAdrian Johnson <ajohnson@redneon.com>2021-08-24 07:26:35 +0930
commit068e9b2eb4d2b50e84c8e0debf38e8ee0b955307 (patch)
tree0ba055f5ad1310b6c7a1b0845b1209b176799a55 /test/meson.build
parent0d809e8051439a4a88a4a97a89e2715d92554a25 (diff)
downloadcairo-068e9b2eb4d2b50e84c8e0debf38e8ee0b955307.tar.gz
Fix malloc overflow check warning
To fix this warning: ../src/cairo-malloc-private.h:83:32: warning: comparison is always false due to limited range of data type [-Wtype-limits] 83 | ((size) != 0 && (size_t) (a) >= SIZE_MAX / (size_t) (size) ? NULL : \ | ^~ Create two new macros to do the overflow checks: _cairo_addl_size_t_overflow and _cairo_mul_size_t_overflow. Implement them using compiler builtins where available. Update cairo-malloc-private to use these fuctions and add an overflow test to test the functions.
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 0647d6fc3..73bb0d2d9 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -236,6 +236,7 @@ test_sources = [
'operator-source.c',
'operator-www.c',
'outline-tolerance.c',
+ 'overflow.c',
'over-above-source.c',
'over-around-source.c',
'over-below-source.c',