Fix UB in SkString::equal(nullptr) when empty.
It is undefined behavior to memcmp with a nullptr. It is possible to
get into such a state if the SkString is itself empty and compared
against nullptr using SkString::equal.
Change-Id: I7a55d7beb5ed454c73a56f47c3729f3790a5fd78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306951
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
1 file changed