better check for devoptab name

This commit is contained in:
tantricity 2010-09-04 07:15:56 +00:00
parent 5f29cee9cb
commit d5702c9f29

View File

@ -72,7 +72,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
devoptab_t* devops; devoptab_t* devops;
char* nameCopy; char* nameCopy;
if(!name || !interface) if(!name || strlen(name) > 8 || !interface)
return false; return false;
if(!interface->startup()) if(!interface->startup())
@ -82,7 +82,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec
return false; return false;
char devname[10]; char devname[10];
snprintf(devname, 10, "%s:", name); sprintf(devname, "%s:", name);
if(FindDevice(devname) >= 0) if(FindDevice(devname) >= 0)
return true; return true;