1
1

fs/base: securily use readlink

as reported by Coverity with CIDs 1287031 and 1287032
Этот коммит содержится в:
Gilles Gouaillardet 2015-03-09 11:20:51 +09:00
родитель 33841361c0
Коммит 59f298a534

Просмотреть файл

@ -68,7 +68,7 @@ void mca_fs_base_get_parent_dir ( char *filename, char **dirnamep)
int namelen;
char linkbuf[PATH_MAX+1];
namelen = readlink(filename, linkbuf, PATH_MAX+1);
namelen = readlink(filename, linkbuf, PATH_MAX);
if (namelen == -1) {
/* something strange has happened between the time that
* we determined that this was a link and the time that