Fix bluetooth fails to turn on issue.
Original author: Luiz Augusto von Dentz <email@example.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.
1 file changed