Try to prevent a potential buffer overflow for WIN33.
This commit is contained in:
parent
2080773f37
commit
0b3164c312
1 changed files with 2 additions and 2 deletions
|
@ -255,11 +255,11 @@ void helpCb (puObject *)
|
|||
# ifdef __CYGWIN__
|
||||
cygwin32_conv_to_full_win32_path(path.c_str(),win32_name);
|
||||
# else
|
||||
strcpy(win32_name,path.c_str());
|
||||
strncpy(win32_name,path.c_str(), 1024);
|
||||
# endif
|
||||
Dummy[0] = 0;
|
||||
FindExecutable(win32_name, Dummy, ExecName);
|
||||
sprintf(browserParameter, "file:///%s", win32_name);
|
||||
snprintf(browserParameter, 1024, "file:///%s", win32_name);
|
||||
ShellExecute ( NULL, "open", ExecName, browserParameter, Dummy,
|
||||
SW_SHOWNORMAL ) ;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue