зеркало из https://github.com/mozilla/pjs.git
Fixing bug 383769. nsLocalFile::EnsureShortPath should check if GetShortPathNameW failed. r=benjamin@smedbergs.us
This commit is contained in:
Родитель
9164ed181b
Коммит
f76e322a62
|
@ -2929,7 +2929,8 @@ nsLocalFile::EnsureShortPath()
|
||||||
WCHAR thisshort[MAX_PATH];
|
WCHAR thisshort[MAX_PATH];
|
||||||
DWORD thisr = ::GetShortPathNameW(mWorkingPath.get(), thisshort,
|
DWORD thisr = ::GetShortPathNameW(mWorkingPath.get(), thisshort,
|
||||||
sizeof(thisshort));
|
sizeof(thisshort));
|
||||||
if (thisr < sizeof(thisshort))
|
// If an error occured (thisr == 0) thisshort is uninitialized memory!
|
||||||
|
if (thisr != 0 && thisr < sizeof(thisshort))
|
||||||
mShortWorkingPath.Assign(thisshort);
|
mShortWorkingPath.Assign(thisshort);
|
||||||
else
|
else
|
||||||
mShortWorkingPath.Assign(mWorkingPath);
|
mShortWorkingPath.Assign(mWorkingPath);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче