summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-08-02 11:14:17 +0000
committerRobert Pösel <robyer@seznam.cz>2012-08-02 11:14:17 +0000
commite61acad8085d66f210b03187955e5ce1923bd04a (patch)
treee36953191a50f19b0e85f41406d01594eb41644e /plugins
parent81ef6547748bb256da82eff4c1b37eac32363c93 (diff)
Another crashfix for linklist.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1325 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index 17036bb8f6..4e99d30a9d 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -207,9 +207,9 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
if ( type == LINK_MAIL && _tcsstr(link, _T("mailto:")) == NULL )
{
- _tcscpy_s(templink, _countof(templink), link);
- _tcscpy_s(link, _countof(link), _T("mailto:"));
- _tcsncpy_s(link + _mstrlen(_T("mailto:")), _countof(link), templink, LINK_MAX-_mstrlen(_T("mailto:")));
+ _tcsncpy_s(templink, _countof(templink), link, LINK_MAX-1);
+ _tcsncpy_s(link, _countof(link), _T("mailto:"), LINK_MAX-1);
+ _tcsncpy_s(link + _mstrlen(_T("mailto:")), _countof(link), templink, LINK_MAX-_mstrlen(_T("mailto:"))-1);
}
// Add new Element to list:
@@ -220,9 +220,9 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
ZeroMemory(newElement, sizeof(LISTELEMENT));
newElement->direction = direction;
newElement->type = type;
- _tcscpy_s(newElement->date, _countof(newElement->date), date);
- _tcscpy_s(newElement->time, _countof(newElement->time), time);
- _tcscpy_s(newElement->link, _countof(newElement->link), link);
+ _tcsncpy_s(newElement->date, _countof(newElement->date), date, DATE_SIZE-1);
+ _tcsncpy_s(newElement->time, _countof(newElement->time), time, TIME_SIZE-1);
+ _tcsncpy_s(newElement->link, _countof(newElement->link), link, LINK_MAX-1);
newElement->hEvent = hEvent;
actualElement = listStart;