lokdocview: guard against int overflow
commit28447258fb6d9b8246f2a96d1a86945ef255d110
authorMiklos Vajna <vmiklos@collabora.co.uk>
Tue, 20 Sep 2016 15:04:50 +0000 (20 17:04 +0200)
committerMiklos Vajna <vmiklos@collabora.co.uk>
Tue, 20 Sep 2016 18:38:51 +0000 (20 20:38 +0200)
tree781ae22aa7ab86769046ac003cfbe659f21fae92
parent11aa8ac4e3ae212cd06ffe9f24c5d99af5dfb9a3
lokdocview: guard against int overflow

If a too large rectangle is parsed, the width or the height may be
larger than std::numeric_limits<int>::max(), in that case just set
width/height to that max value, instead of allowing an overflow.

Change-Id: Ic01319b01a3f9286501c346ea765868be57466a1
libreofficekit/source/gtk/lokdocview.cxx