Android 3.2 release 1
Fix bluetooth fails to turn on issue.

Bug: 4062227

Original author: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Cherry-picked from upstream Bluez.

Fix crash when mmaping files which size is multiple of page size

In this case the buffer returned by mmap is not NULL terminated so
functions like strpbrk that expect a string goes out of bounds.

To fix this strpbrk_len was introduced which takes the size of the buffer
making sure it never goes out of bounds.

Change-Id: I9bde9a008e90d12b3fd08ad9c20ad27e9fb41535
1 file changed