unix: cane before root removal

This commit is contained in:
Jōshin 2022-01-31 16:34:09 -06:00
parent 6c5d7133f1
commit 0375646a93
No known key found for this signature in database
GPG Key ID: A8BE5A9A521639D0

View File

@ -280,13 +280,13 @@ u3_unix_save(c3_c* pax_c, u3_atom pad)
c3_y* pad_y;
c3_c* ful_c;
if ( '/' == *pax_c) {
pax_c++;
}
if ( !u3_unix_cane(pax_c) ) {
u3l_log("%s: non-canonical path\n", pax_c);
u3z(pad); u3m_bail(c3__fail);
}
if ( '/' == *pax_c) {
pax_c++;
}
lod_w = strlen(u3_Host.dir_c);
len_w = lod_w + sizeof("/.urb/put/") + strlen(pax_c);
ful_c = c3_malloc(len_w);