path: Avoid integer overflow in get_distance()
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 23 Apr 2012 16:42:40 +0000 (17:42 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 27 Apr 2012 11:28:49 +0000 (12:28 +0100)
commit0fca11ec2f38e15fda2a27f31f39110c91f2a4f0
tree3e0a9f5c1acd70bab2e2e0c1ba6c8704b5b0e853
parent9428aaa3cbfb49bbaee180774d4a760b7cac0c25
path: Avoid integer overflow in get_distance()

The get_distance() API uses machine integers to compute the distance;
this means that on 32bit we can overflow the integer size. This gets
hidden by the fact that get_distance() returns an unsigned integer as
well.

In reality, ClutterPath is an unmitigated mess, and the only way to
actually fix it is to break API.

https://bugzilla.gnome.org/show_bug.cgi?id=652521
clutter/clutter-path.c
tests/conform/path.c