Removed strcpy calls

This commit is contained in:
James Booth
2014-04-02 21:01:20 +01:00
parent e1db531875
commit a720ef2627
8 changed files with 31 additions and 34 deletions

View File

@@ -193,14 +193,14 @@ _notify(const char * const message, int timeout,
nid.uVersion = NOTIFYICON_VERSION;
//nid.uCallbackMessage = WM_MYMESSAGE;
nid.hIcon = LoadIcon(NULL, IDI_APPLICATION);
strcpy(nid.szTip, "Tray Icon");
strncpy(nid.szTip, "Tray Icon", 10);
nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
Shell_NotifyIcon(NIM_ADD, &nid);
// For a Ballon Tip
nid.uFlags = NIF_INFO;
strcpy(nid.szInfoTitle, "Profanity"); // Title
strcpy(nid.szInfo, message); // Copy Tip
strncpy(nid.szInfoTitle, "Profanity", 10); // Title
strncpy(nid.szInfo, message, 256); // Copy Tip
nid.uTimeout = timeout; // 3 Seconds
nid.dwInfoFlags = NIIF_INFO;