Hi All,

I fixed a bug in the HdrEncodeInline->StrEncodeQPEx wrote about yesterday.

Problem happens with 'Q' encoding if input strings contain to many spaces
(more than MaxCol parameter).

So, here:

if (Buf[cPos] = ' ') and ShortSpace then begin
   Result[lPosRes] := '_';
   Inc(lPosRes);
   Inc(cPos);
   end

We write outside bounds set at beginning of function: SetLength(Result,
MaxCol);
Because number of spaces in input string may be larger than MaxCol !

To fix problem - this line (number 2064 in OverbyteIcsMimeUtils.pas):

if (Buf[cPos] = ' ') and ShortSpace then begin

must be replaced with

if (Buf[cPos] = ' ') and  (lPosRes < MaxCol) and ShortSpace then begin

I also check latest ICS V8 code and this problem is NOT fixed here !
So, you should apply this fix to both V7 and V8.

---
With best regards, Max Terentiev.
Business Software Products.
AMS Development Team.
supp...@bspdev.com



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to