]> git.tuebingen.mpg.de Git - paraslash.git/commit
vss: Don't prefault header.
authorAndre Noll <maan@systemlinux.org>
Thu, 10 Nov 2011 09:14:21 +0000 (10:14 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 11 Nov 2011 09:01:40 +0000 (10:01 +0100)
commit71bcf40d3aeed43884c8db9e44d5eade41f22db2
treed36ddc5779a7281167382f5601d67859912992e1
parentff70d3f74c6116cf5b3c9a6708218788363efa7c
vss: Don't prefault header.

Commit 7bba6232 (vss: Mmap audio files using MAP_POPULATE.) introduced
read-ahead for chunks of the mmapped audio file. However, it missed
the fact that for ogg streams chunk 0 is created on the fly and stored
in a dynamically allocated buffer. Read-ahead on this buffer is likely
to access memory not owned by the process and might lead to a segfault.

Fix this bug by not performing read-ahead for chunk zero.
vss.c