Return ENAMETOOLONG for long PATH_LOCALE, not EFAULT
This commit is contained in:
parent
a17eafe2a8
commit
83c9580dbb
@ -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…
x
Reference in New Issue
Block a user