Add sys_exec () and libprocess wrapper, fix ramdisk tar parsing
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m26s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m26s
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
bool path_validate_char (char ch) {
|
||||
return ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||
|
||||
(ch == '_') || (ch == '_'));
|
||||
(ch == '_') || (ch == '-') || (ch == '/'));
|
||||
}
|
||||
|
||||
bool path_validate (const char* path) {
|
||||
@@ -13,21 +13,6 @@ bool path_validate (const char* path) {
|
||||
|
||||
const char* ptr = path;
|
||||
|
||||
if (*ptr == ':')
|
||||
return false;
|
||||
|
||||
while (*ptr != ':' && *ptr != '\0') {
|
||||
if (!path_validate_char (*ptr))
|
||||
return false;
|
||||
|
||||
ptr++;
|
||||
}
|
||||
|
||||
if (*ptr != ':')
|
||||
return false;
|
||||
|
||||
ptr++;
|
||||
|
||||
if (*ptr != '/')
|
||||
return false;
|
||||
|
||||
@@ -41,7 +26,7 @@ bool path_validate (const char* path) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
if (ptr > path && *(ptr - 1) == '/' && *(ptr - 2) != ':')
|
||||
if (ptr > path + 1 && *(ptr - 1) == '/')
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user