* syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
file parameter.
This commit is contained in:
parent
c0a8e8d0f9
commit
bb5225c236
|
@ -1,3 +1,8 @@
|
|||
2002-01-10 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
|
||||
file parameter.
|
||||
|
||||
2002-01-09 Christopher Faylor <cgf@redhat.com>
|
||||
Robert Collins <rbtcollins@hotmail.com>
|
||||
|
||||
|
|
|
@ -1424,6 +1424,8 @@ pathconf (const char *file, int v)
|
|||
switch (v)
|
||||
{
|
||||
case _PC_PATH_MAX:
|
||||
if (check_null_empty_str_errno (file))
|
||||
return -1;
|
||||
return PATH_MAX - strlen (file);
|
||||
case _PC_NAME_MAX:
|
||||
return PATH_MAX;
|
||||
|
|
Loading…
Reference in New Issue