]> arthur.barton.de Git - netatalk.git/commitdiff
Fix a possible crash when searching on large volumes
authorRalph Boehme <sloowfranklin@gmail.com>
Tue, 11 Dec 2012 12:42:12 +0000 (13:42 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Tue, 11 Dec 2012 15:00:40 +0000 (16:00 +0100)
catsearch() used dirlookup() to lookup directories, but then it didn't
use movecwd() to cd into them, only lchdir(). This resulted in curdir
not being updated.
Then, while processing entries of directory and adding them to the
dircache, in case the dircache hit its maximum size limit, dircache
eviction would take place.
The dircache eviction will remove a fixed size number of directories
from the cache, but for every entry to be freed it will ensure that
it's nor curdir.
Unfortunately as catsearch didn't update that, the directory that
catsearch was working on was freed, which of course resulted in access
of invalid ressouces and possible crashes.
The fix is to just use movecwd() instead of lchdir()ing directly.


No differences found