Improve the pointer-overflow bug fix.
Improve the pointer-overflow bug fix.

Change-Id: I07434e2a0a594516e478e414bf5479c28bc4ed71
Reviewed-on: https://code-review.googlesource.com/14274
Reviewed-by: Paul Wankadia <62d4e38bb1380f055ec4b899baa75e52af09c5f7@google.com>

google/re2,google/re2,google/re2,google/re2,google/re2