diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-11 17:46:50 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-11 17:46:50 +0400 |
commit | bb34520662cf0422d8dbca5b215a12a5dfe3ff24 (patch) | |
tree | 30bab4b251a852bf3b6e17650a1acf2733529f39 /src | |
parent | a630262e1d744bdb269c85ecfb7a03adc7f35ce1 (diff) |
VSFilter/Systray.cpp: use _tcscpy_s and thus fix a buffer overrun (warning C6057, found with /analyze)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5088 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/filters/transform/VSFilter/Systray.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filters/transform/VSFilter/Systray.cpp b/src/filters/transform/VSFilter/Systray.cpp index a22c78e60..6b7d48bd3 100644 --- a/src/filters/transform/VSFilter/Systray.cpp +++ b/src/filters/transform/VSFilter/Systray.cpp @@ -166,7 +166,7 @@ LRESULT CSystrayWindow::OnTaskBarRestart(WPARAM, LPARAM) //tnid.hIcon = (HICON)LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ICON1), IMAGE_ICON, 0, 0, LR_LOADTRANSPARENT);
tnid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
tnid.uCallbackMessage = WM_NOTIFYICON;
- lstrcpyn(tnid.szTip, _T("DirectVobSub"), sizeof(tnid.szTip));
+ _tcscpy_s(tnid.szTip, _T("DirectVobSub"));
BOOL res = Shell_NotifyIcon(NIM_ADD, &tnid);
@@ -174,7 +174,7 @@ LRESULT CSystrayWindow::OnTaskBarRestart(WPARAM, LPARAM) DestroyIcon(tnid.hIcon);
}
- return res?0:-1;
+ return res ? 0 : -1;
}
return 0;
|