[NTP] Ensure that search suggestion hashes are exactly 4 bytes
Hashes for search suggestions should be exactly 4 alphanumeric bytes, this is explicitly enforced in searchbox_extension but in search_suggest_service the byte array must be truncated to a length of 4 as the length is lost when passed through via IPC. Previously the check was that they were *up to* 4 bytes, but this isn't strict enough. Also remove usage of the banned std::to_string. Bug: 965715 Change-Id: I687496ccaf225118a8f7b07bbaa2913bba19e6b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632716 Commit-Queue: Kyle Milka <kmilka@chromium.org> Reviewed-by:Gayane Petrosyan <gayane@chromium.org> Cr-Commit-Position: refs/heads/master@{#664345}
Showing
Please register or sign in to comment