RTC Forums

Subscription => Support => Topic started by: Dany on March 06, 2018, 06:42:42 PM



Title: Range check error (when turning range checking on) [MULTIPART/FORM-DATA]
Post by: Dany on March 06, 2018, 06:42:42 PM
Hello!

I have turned range-checking on :)

At 31105 (rtcInfo v9.22) in TRtcHttpValues.PrepareValues when "right" is going to be read from a file (the payload was large enough to have been written to a file by RTC) i get range check error when the payload is MULTIPART/FORM-DATA... and the string that the browser sent in this request request looked like this:

Code:
------WebKitFormBoundaryfB4CYPVuAwXZpY0q
Content-Disposition: form-data; name="versionComment"


------WebKitFormBoundaryfB4CYPVuAwXZpY0q

The requester indended the "versionComment" field to be blank.

So when we get down to line 31105

Code:
if right='' then
   begin
   StatusLine:=Read_File(ftemp,at,MyPos-at);

MyPos-at = 0 and i think that is what's triggering the exception in ReadFile (via Read_File and Read_FileEx).

1. Did the requester divert from some RFC? There's a lot of JS on the other side so might be possible. I have read some but cannot find the above chunk to be wrong.
2. Should i turn range-checking off? I'd rather like it on as i have found some small thingies in my code when on.
3. Could it be a bug?

TIA,

/Dany


Title: Re: Range check error (when turning range checking on) [MULTIPART/FORM-DATA]
Post by: D.Tkalcec (RTC) on March 06, 2018, 09:00:56 PM
Please, download RTC SDK v9.23 (just uploaded) and let me know if that fixes your problem.


Title: Re: Range check error (when turning range checking on) [MULTIPART/FORM-DATA]
Post by: Dany on March 07, 2018, 10:25:29 AM
Yes, it does indeed.  :) Many thanks!

/D


Title: Re: Range check error (when turning range checking on) [MULTIPART/FORM-DATA]
Post by: D.Tkalcec (RTC) on March 07, 2018, 10:26:46 AM
Great! Thank you for your feedback.