mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-27 02:30:56 +00:00
better check for devoptab name
This commit is contained in:
parent
5f29cee9cb
commit
d5702c9f29
@ -72,7 +72,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
|
||||
devoptab_t* devops;
|
||||
char* nameCopy;
|
||||
|
||||
if(!name || !interface)
|
||||
if(!name || strlen(name) > 8 || !interface)
|
||||
return false;
|
||||
|
||||
if(!interface->startup())
|
||||
@ -82,7 +82,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
|
||||
return false;
|
||||
|
||||
char devname[10];
|
||||
snprintf(devname, 10, "%s:", name);
|
||||
sprintf(devname, "%s:", name);
|
||||
if(FindDevice(devname) >= 0)
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user