diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-12-04 07:41:50 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-12-04 07:41:50 +0000 |
commit | 396ff8489eac5526a8299168ea9bb863034abcab (patch) | |
tree | d854e1de62fbe3568411e1f12d1763b02b8d3bcd | |
parent | 02e993e1975441370373952797ca0c123bd4c8db (diff) |
Dbx_mmap_SA: Athena cryptor crash fix
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@240 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r-- | Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas | 12 |
1 files changed, 7 insertions, 5 deletions
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;
|