[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kpilot/lib
From: Adriaan de Groot <groot () kde ! org>
Date: 2004-08-03 15:34:37
Message-ID: 20040803153437.EDF5E8EB3 () office ! kde ! org
[Download RAW message or body]
CVS commit by adridg:
Fix last-char-truncated
M +2 -4 pilotMemo.cc 1.14
--- kdepim/kpilot/lib/pilotMemo.cc #1.13:1.14
@@ -68,5 +68,5 @@ void *PilotMemo::pack(void *buf, int *le
QCString s = codec()->fromUnicode(fText);
- unsigned int use_length = *len;
+ unsigned int use_length = Q_MIN(*len,MAX_MEMO_LEN);
// It won't fit if the buffer is too small. This second test
@@ -76,10 +76,8 @@ void *PilotMemo::pack(void *buf, int *le
// Zero out the buffer, up to the max memo size.
- use_length = QMIN(MAX_MEMO_LEN,use_length);
memset(buf,0,use_length);
// Copy the encoded string and make extra sure it's NUL terminated.
// Yay, _every_ parameter needs a cast.
- use_length = QMIN(s.length(),use_length);
strlcpy(( char *)buf,(const char *)s,use_length);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic