commit | 2d3a762fa7bef764945ea83ddcb1f8d2bf502b7e | [log] [tgz] |
---|---|---|
author | Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> | Fri Dec 17 15:31:26 2010 +0200 |
committer | Johan Hedberg <johan.hedberg@nokia.com> | Fri Dec 17 15:49:31 2010 +0200 |
tree | e1e47dc2feac9828c3ce5d2ca145048d2830883b | |
parent | fa2a8b9000a82038c1338ff2c416cd96fe273a9f [diff] |
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.