mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
[BUG_FIXED] Fix a crash bug while file path as argument and its length is more than 260 characters(MAX_PATH).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@980 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
41432b9f6d
commit
fa5fb505ce
@ -38,11 +38,16 @@ public :
|
|||||||
//if (!fileNameStr) return;
|
//if (!fileNameStr) return;
|
||||||
TCHAR *pStr = NULL;
|
TCHAR *pStr = NULL;
|
||||||
bool isInsideQuotes = false;
|
bool isInsideQuotes = false;
|
||||||
TCHAR str[MAX_PATH];
|
const int filePathLength = MAX_PATH;
|
||||||
|
|
||||||
|
TCHAR str[filePathLength];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
bool fini = false;
|
bool fini = false;
|
||||||
for (pStr = (TCHAR *)fileNameStr ; !fini ; )
|
for (pStr = (TCHAR *)fileNameStr ; !fini ; )
|
||||||
{
|
{
|
||||||
|
if (i >= filePathLength)
|
||||||
|
break;
|
||||||
|
|
||||||
switch (*pStr)
|
switch (*pStr)
|
||||||
{
|
{
|
||||||
case '"' :
|
case '"' :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user