Fix undefined behavior.
Fix undefined behavior.

BUG=skia:4050

Review URL: https://codereview.chromium.org/1232003008

ominux/skia,tmpvar/skia.cc,rubenvb/skia,google/skia,noselhq/skia,noselhq/skia,noselhq/skia,noselhq/skia,aosp-mirror/platform_external_skia,nvoron23/skia,pcwalton/skia,tmpvar/skia.cc,ominux/skia,todotodoo/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,noselhq/skia,aosp-mirror/platform_external_skia,ominux/skia,google/skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,todotodoo/skia,ominux/skia,nvoron23/skia,shahrzadmn/skia,ominux/skia,google/skia,vanish87/skia,google/skia,Hikari-no-Tenshi/android_external_skia,qrealka/skia-hc,nvoron23/skia,Hikari-no-Tenshi/android_external_skia,google/skia,nvoron23/skia,HalCanary/skia-hc,rubenvb/skia,todotodoo/skia,vanish87/skia,HalCanary/skia-hc,qrealka/skia-hc,nvoron23/skia,shahrzadmn/skia,HalCanary/skia-hc,vanish87/skia,HalCanary/skia-hc,nvoron23/skia,shahrzadmn/skia,HalCanary/skia-hc,rubenvb/skia,nvoron23/skia,Hikari-no-Tenshi/android_external_skia,pcwalton/skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,qrealka/skia-hc,pcwalton/skia,vanish87/skia,shahrzadmn/skia,aosp-mirror/platform_external_skia,pcwalton/skia,shahrzadmn/skia,qrealka/skia-hc,todotodoo/skia,pcwalton/skia,rubenvb/skia,vanish87/skia,vanish87/skia,noselhq/skia,tmpvar/skia.cc,todotodoo/skia,tmpvar/skia.cc,google/skia,ominux/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,noselhq/skia,aosp-mirror/platform_external_skia,ominux/skia,google/skia,rubenvb/skia,HalCanary/skia-hc,noselhq/skia,noselhq/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,tmpvar/skia.cc,aosp-mirror/platform_external_skia,pcwalton/skia,shahrzadmn/skia,tmpvar/skia.cc,ominux/skia,HalCanary/skia-hc,todotodoo/skia,todotodoo/skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,qrealka/skia-hc,nvoron23/skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,shahrzadmn/skia,nvoron23/skia,rubenvb/skia,vanish87/skia,shahrzadmn/skia,ominux/skia,pcwalton/skia,shahrzadmn/skia,vanish87/skia,todotodoo/skia,rubenvb/skia,HalCanary/skia-hc,pcwalton/skia,vanish87/skia,pcwalton/skia,qrealka/skia-hc,tmpvar/skia.cc,HalCanary/skia-hc,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,todotodoo/skia,google/skia