SkUTF8_CountUnichars(s,l) and SkUTF8_NextUnichar(s,l) now safe.

Theory:  We will accept blobs of data as utf-8 text without validation,
but when it comes time to process it: count code poits or convert to
code points, be careful to check for errors.

TODO: SkTypeface::charsToGlyphs() needs to take a length.

Change-Id: Id8110ab43dbffce96faffdda1e0bdaa39cad40e4
Reviewed-on: https://skia-review.googlesource.com/6849
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
5 files changed