Fail if the cwd is too long as well.

This commit is contained in:
Unknown W. Brackets 2013-05-12 17:03:46 -07:00
parent 8e1193feba
commit 0f459f9000

View File

@ -309,6 +309,10 @@ void MetaFileSystem::ThreadEnded(int threadID)
int MetaFileSystem::ChDir(const std::string &dir)
{
// Retain the old path and fail if the arg is 1023 bytes or longer.
if (dir.size() >= 1023)
return SCE_KERNEL_ERROR_NAMETOOLONG;
int curThread = __KernelGetCurThread();
std::string of;