don't walk off end of pointer

Avoids pointer-overflow in ASAN/UBSAN.

R=mtklein@google.com

Bug:836282
Change-Id: I2125fa7927c30ae601431af8daec0f900c84799c
Reviewed-on: https://skia-review.googlesource.com/131261
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
1 file changed