XorBlock AV

Home Forums kbmMW XorBlock AV

Viewing 3 reply threads
  • Author
    Posts
    • #56559
      Babis Michael
      Participant

      Hello,

      XorBlock (kbmMWCipherHash) needs to be NativeUInt (or Int ?) variables instead of Longword in 64-bit else will result in AV when try to encrypt large files!

      // Replaced with NativeUInt from longword
      procedure XorBlock(var InData1, InData2; Size: NativeUInt);
      var
      i: NativeUInt;
      begin
      for i:= 1 to Size do
      Pbyte(NativeUInt(@InData1)+i-1)^:= Pbyte(NativeUInt(@InData1)+i-1)^ xor Pbyte(NativeUInt(@InData2)+i-1)^;
      end;

      Thank you

       

    • #56565
      kimbomadsen
      Keymaster

      Hi,

      Thank you for your bugreport and fix. It will be in next release!

      /Kim/C4D

    • #56727
      Babis Michael
      Participant

      This is NOT fixed in 5.20! You forgot one NativeUInt!
      Pbyte(NativeUInt(@InData1)+i-1)^:= Pbyte(NativeUInt(@InData1)+i-1)^ xor Pbyte(longword(@InData2)+i-1)^;
      the last LongWord should be NativeUInt too!

      Thank you

    • #56734
      kimbomadsen
      Keymaster

      Damn!

      Well.. it will be in the bugfix update to be released shortly.

      /Kim

Viewing 3 reply threads
  • You must be logged in to reply to this topic.