Opened 7 years ago

#381 new defect

fsResolveUnix path lengh limit check limits paths to 258 characters

Reported by: Steven Levine Owned by:
Priority: normal Milestone: new
Component: libc Version: 0.6.6
Severity: normal Keywords:
Cc:

Description

fsResolveUnix checks for path overflow with:

fs.c:1058

if (cchNativePath + 2 > PATH_MAX) {

rcRet = -ENAMETOOLONG; break;

} memcpy(pszNativePath, pszUserPath, cchNativePath + 1);

This limits the maximum path length to 259 characters. The check should be

cchNativePath >= PATH_MAX

fsResolveUnix contains another occurrence of this issue:

fs.c:1404

if (cchSymlink + cchLeft + 2 >= PATH_MAX) {

rcRet = -ENAMETOOLONG; break;

}

Change History (0)

Note: See TracTickets for help on using tickets.