aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/pixman/pixman-utils.c')
-rw-r--r--pixman/pixman/pixman-utils.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pixman/pixman/pixman-utils.c b/pixman/pixman/pixman-utils.c
index cb4e62199..49e3488aa 100644
--- a/pixman/pixman/pixman-utils.c
+++ b/pixman/pixman/pixman-utils.c
@@ -31,15 +31,19 @@
#include "pixman-private.h"
pixman_bool_t
-pixman_multiply_overflows_int (unsigned int a,
- unsigned int b)
+_pixman_multiply_overflows_size (size_t a, size_t b)
+{
+ return a >= SIZE_MAX / b;
+}
+
+pixman_bool_t
+_pixman_multiply_overflows_int (unsigned int a, unsigned int b)
{
return a >= INT32_MAX / b;
}
pixman_bool_t
-pixman_addition_overflows_int (unsigned int a,
- unsigned int b)
+_pixman_addition_overflows_int (unsigned int a, unsigned int b)
{
return a > INT32_MAX - b;
}