Title: Bug in Mime_DecodeEx - range check error Post by: Max Terentiev on February 06, 2017, 03:52:09 PM Hi Danijel,
Mime_DecodeEx fails with Range check error on this base64 string: /v///wABAAAAAERYVUZNVAYEAAAAegB6ADEAJQABAAAABQAAAEUAbQBhAGkAbAASBAAAAHoAegAxACUA Try: Mime_DecodeEx(RtcStringToBytes('/v///wABAAAAAERYVUZNVAYEAAAAegB6ADEAJQABAAAABQAAAEUAbQBhAGkAbAASBAAAAHoAegAxACUA')); And you got range check error exception. This bug affects json parser (TRtcByteStream.FromJson) so, it's serious problem ! Title: Re: Bug in Mime_DecodeEx - range check error Post by: Max Terentiev on February 06, 2017, 05:27:27 PM This base64 string returned from your MimeEncode function. Initialy I load data this way:
TBlobField(LocalQuery.FieldByName('SegmentCriteria')).SaveToStream(MyResultRecord.NewByteStream('SegmentCriteria')); And same base64 string returned by delphi's TNetEncoding.Base64.Encode and any online base64 encoder in Internet. Here is original binary data file wich converted to base64: https://drive.google.com/file/d/0B2yvbcYNT3ubZE1tUTJMbUJMd1U/view Download it and convert to base64 using your Mime encoding routines, delphi RTL routines or using any online base 64 converter like this http://base64-encoding.online-domain-tools.com/ or this http://www.motobit.com/util/base64-decoder-encoder.asp and you got same string: /v///wABAAAAAERYVUZNVAYEAAAAegB6ADEAJQABAAAABQAAAEUAbQBhAGkAbAASBAAAAHoAegAxACUA So, it's MUST be valid ! Title: Re: Bug in Mime_DecodeEx - range check error Post by: D.Tkalcec (RTC) on February 06, 2017, 06:28:09 PM Please, download RTC SDK v7.77 (just released) and let me know if you still get range check errors, or bump into any other problems with Mime_Decode or Mime_DecodeEx functions.
Best Regards, Danijel Tkalcec Title: Re: Bug in Mime_DecodeEx - range check error Post by: Max Terentiev on February 06, 2017, 06:33:18 PM It's works now ! Thank you very much !
Your support is amazing ! ) |