Ico security issues fix

BUG=skia:3401
BUG=skia:3426
BUG=skia:3441

Review URL: https://codereview.chromium.org/996173005
5 files changed