dot-dot security fix, from redhat tar-1.13.25-1.6.src.rpm

This commit is contained in:
itojun 2002-10-09 12:01:11 +00:00
parent 77dee4dead
commit c873f2dfba
1 changed files with 7 additions and 0 deletions

View File

@ -214,6 +214,13 @@ contains_dot_dot (char const *name)
return 0; return 0;
} }
while (! ISSLASH (*p)); while (! ISSLASH (*p));
do
{
if (! *p++)
return 0;
}
while ( ISSLASH (*p));
} }
} }