mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-12 04:00:17 +00:00
linux: Use internal DIR locks when accessing filepos on telldir
Since it might change during a readdir call. Checked on x86_64-linux-gnu and i686-linux-gnu.
This commit is contained in:
parent
415d0b0b3f
commit
ef3330fde4
@ -23,5 +23,11 @@
|
||||
long int
|
||||
telldir (DIR *dirp)
|
||||
{
|
||||
return dirp->filepos;
|
||||
long int ret;
|
||||
|
||||
__libc_lock_lock (dirp->lock);
|
||||
ret = dirp->filepos;
|
||||
__libc_lock_unlock (dirp->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user