Android 2.3.4 release 0.9
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: I1376613dbb3fe09b89c2f7417c1bd4a8c669b674
1 file changed