summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnodestylecacheprivate.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-04-12 18:54:20 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-04-12 18:58:34 +0100
commitb4c8ba4de7ccb07d09bc2c7895fdf6f8bddf5dc2 (patch)
tree731112065bf5ca4a96467d79986a86cf610e7a5a /gtk/gtkcssnodestylecacheprivate.h
parentad34f731e99051a8218d04ca005d6239de0bf7f2 (diff)
downloadgtk+-b4c8ba4de7ccb07d09bc2c7895fdf6f8bddf5dc2.tar.gz
Check the size of the g_new arguments
We're passing integers without validating their size, and newer GCC are very cross about it, with warnings like: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] We should check we're not overflowing the allocation size, by limiting the range of values we can use. First of all, we need to use `gsize` instead of a random `int`, since we're allocating data. Additionally, we need to check that the multiplication that computes the size of the allocation doesn't overflow the maximum value of a `gsize`.
Diffstat (limited to 'gtk/gtkcssnodestylecacheprivate.h')
0 files changed, 0 insertions, 0 deletions