Add a range of sanity checks to the clipboard object handling. In particular, fix an integer overflow that might be an issue on Linux. Other changes are to avoid OOB reads and calling front() or [] on an empty or insufficiently sized vector.
Add a range of sanity checks to the clipboard object handling. In particular, fix an integer overflow that might be an issue on Linux. Other changes are to avoid OOB reads and calling front() or [] on an empty or insufficiently sized vector.

BUG=31928
TEST=NONE

Review URL: http://codereview.chromium.org/522024

git-svn-id: http://src.chromium.org/svn/trunk/src@35362 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 3300aa2ae208c2a214210f357375bd38bf6ee62b
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser