RESTRICT AUTOMERGE: Fix heap buffer overflow

Bug: b/118143775
Bug: oss-fuzz:11040
Test: I5fe66d06078f3bc674ceab4fbc8aae2ab67bfe1a

Because we're sampling, the offset ends up the same as the width. Back
up to the left enough to fit the bytes we will write.

Include SafetyNet logging from
https://skia-review.googlesource.com/c/skia/+/171227

Change-Id: Ie476a0191b66c2322446b9c0922f630d6e971645
Reviewed-on: https://skia-review.googlesource.com/c/164262
(cherry picked from commit 1a1cec98427fdc9e94614580ec42dbe936c47c55)
1 file changed