Return ENAMETOOLONG for long PATH_LOCALE, not EFAULT
This commit is contained in:
parent
a585ff9d4b
commit
3b1f16ca2d
@ -82,7 +82,7 @@ setrunelocale(encoding)
|
||||
) {
|
||||
if (strlen(p) + 1/*"/"*/ + ENCODING_LEN +
|
||||
1/*"/"*/ + CATEGORY_LEN >= PATH_MAX)
|
||||
return(EFAULT);
|
||||
return (ENAMETOOLONG);
|
||||
_PathLocale = strdup(p);
|
||||
if (_PathLocale == NULL)
|
||||
return (errno);
|
||||
|
Loading…
Reference in New Issue
Block a user