Require whole mount name to match when finding a romfs

This commit is contained in:
friedkeenan 2019-09-01 19:54:45 -05:00 committed by GitHub
parent 4f74aa1ad1
commit 799faa848b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ static romfs_mount *romfsFindMount(const char *name)
}
else if(mount->setup) //Find the mount with the input name.
{
if(strncmp(mount->name, name, strlen(mount->name))==0)
if(strncmp(mount->name, name, sizeof(mount->name)-1)==0)
return mount;
}
}