commit | 8c480f73eed963eeca9b7df3e4c4543c6e43b0d7 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Oct 26 16:57:19 2012 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Oct 26 16:57:19 2012 -0700 |
tree | f577ec0e9955e3ea5bfc3baadbcc99ee0a9079b7 | |
parent | 678d556f439cae504c343c15d77e9ec020a9385c [diff] [blame] |
Fix vold's use of readdir_r(3). Change-Id: I805a1799755429dd1f6f3bdc2e6a02f483587b35
diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 957d06b..bdc7739 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp
@@ -1471,7 +1471,7 @@ } size_t dirent_len = offsetof(struct dirent, d_name) + - pathconf(directory, _PC_NAME_MAX) + 1; + fpathconf(dirfd(d), _PC_NAME_MAX) + 1; struct dirent *dent = (struct dirent *) malloc(dirent_len); if (dent == NULL) {