-
Philip Withnall authored
The recommended way to do an overflow check is to check against the limit you have in mind, rather than doing the calculation and seeing if it failed. Fix this by rearranging the check: move the variables we control (or have previously checked) over to one side, leaving the unknown variable on its own on the left-hand side. This ensures the overflow check doesn’t overflow itself. Coverity ID: 1388538 https://bugzilla.gnome.org/show_bug.cgi?id=777315
d579de66