Fix string overrun exception

Fix SearchUtil::contains() so doesn't overrun string buffer when trying
to match query that partially matches end of the buffer.

Bug:7971792
Change-Id: Ifff09049b0a82af17413a7e56b9e5de938ff009d
2 files changed