mirror of
https://github.com/wiiu-env/libmocha.git
synced 2024-11-17 00:49:24 +01:00
Fix empty paths
This commit is contained in:
parent
aec8cd6957
commit
e1274af0ea
@ -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