mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Fix a couple possible buffer overruns.
This commit is contained in:
1 parent
45ec0c8a14
commit
964a50ca05
2 files changed
+4
-4
No files matched your search
@@ -64,8 +64,8 @@ namespace W32Util
|
||||
ofn.hwndOwner = _hParent;
|
||||
ofn.Flags = OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_HIDEREADONLY;
|
||||
|
||||
if (_strFileName.size () != 0)
|
||||
wcscpy(ofn.lpstrFile, ConvertUTF8ToWString(_strFileName).c_str());
|
||||
if (!_strFileName.empty())
|
||||
wcsncpy(ofn.lpstrFile, ConvertUTF8ToWString(_strFileName).c_str(), MAX_PATH);
|
||||
|
||||
if (((_bLoad) ? GetOpenFileName(&ofn) : GetSaveFileName (&ofn)))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user