mirror of
https://github.com/wiiu-env/libmocha.git
synced 2024-06-01 22:08:44 +02:00
Fix empty paths
This commit is contained in:
parent
e8c79ee85d
commit
24df55f2f7
|
@ -16,11 +16,17 @@ __fsa_fixpath(struct _reent *r,
|
|||
p = (char *) path;
|
||||
}
|
||||
|
||||
if (strlen(p) > FS_MAX_PATH) {
|
||||
uint32_t sizePath = strlen(p);
|
||||
if (sizePath > FS_MAX_PATH) {
|
||||
r->_errno = ENAMETOOLONG;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (sizePath == 0) {
|
||||
r->_errno = ENOENT;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fixedPath = (char *) memalign(0x40, FS_MAX_PATH + 1);
|
||||
if (!fixedPath) {
|
||||
r->_errno = ENOMEM;
|
||||
|
|
Loading…
Reference in New Issue
Block a user