From 396ff8489eac5526a8299168ea9bb863034abcab Mon Sep 17 00:00:00 2001 From: watcherhd Date: Sun, 4 Dec 2011 07:41:50 +0000 Subject: Dbx_mmap_SA: Athena cryptor crash fix git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@240 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Dbx_mmap_SA/Cryptors') diff --git a/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas b/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas index 500a2eb..f9a130b 100644 --- a/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas +++ b/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas @@ -17,7 +17,8 @@ const function Int2Hex(Value:dword;Digits:integer=0):AnsiString; var - i:dword; + i:cardinal; + buf:array [0..31] of AnsiChar; begin if Digits<=0 then begin @@ -28,13 +29,14 @@ begin inc(Digits); until i=0; end; - result:=''; - result[Digits]:=#0; + + buf[Digits]:=#0; repeat - result[Digits]:=AnsiChar(HexDigitChr[Value and $F]); - Value:=Value shr 4; Dec(Digits); + buf[Digits]:=AnsiChar(HexDigitChr[Value and $F]); + Value:=Value shr 4; until Digits=0; + result:=buf; end; //============================================================================== function MD5_arr(const s: AnsiString): TMD5; -- cgit v1.2.3