[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 6/7] Mini-OS: add open and close handling to the 9pfs frontend
Juergen Gross, le ven. 10 févr. 2023 11:46:27 +0100, a ecrit: > +static bool path_canonical(const char *pathname) > +{ > + unsigned int len = strlen(pathname); > + const char *c; > + > + /* Empty path is allowed. */ > + if ( !len ) > + return true; > + > + /* No trailing '/'. */ > + if ( pathname[len - 1] == '/' ) > + return false; > + > + /* No self or parent references. */ > + c = pathname; > + while ( (c = strstr(c, "/.")) != NULL ) > + { > + if ( c[2] == '.' ) > + c++; > + if ( c[2] == 0 || c[2] == '/' ) > + return false; > + c += 2; > + } > + > + return true; > +} This doesn't seem to be catching "//"? Samuel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |