ico: Fix potential integer overflow
ico: Fix potential integer overflow

Which relies on undefined behaviour. Instead of checking for an
overflowed integer after the fact, check whether the addition would
be possible at all.

Fixes: CVE-2017-6312

https://bugzilla.gnome.org/show_bug.cgi?id=779012

GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf