[Live-devel] Bug / patch in parseRTSPRequestString
Ross Finlayson
finlayson at live555.com
Thu Nov 13 01:31:21 PST 2008
>I looked into the code, and here is some comments :
>
>- The following line appears to be useless, as j is set to i+1 next line :
> while (j < reqStrSize && (reqStr[j] == ' ' || reqStr[j] == '\t'))
>++j; // skip
>over any additional white space
> for (j = i+1; (int)j < (int)(reqStrSize-8); ++j) {
Yes. The "for" statement should have been:
for (; (int)j < (int)(reqStrSize-8); ++j) {
>- My bug was because here, and I think k1 was 0 in my case
>// Also look for the URL 'pre-suffix' before this:
>unsigned k3 = --k1;
>
>So why not adding a check like :
>unsigned k3=0;
>if( k1 > 0)
> k3 = --k1;
Thanks, yes. I have now released a new version (2008.11.13) of the
code that fixes this problem. Please let me know if this works OK
for you now.
(Note, though, that you happened to run into this bug because your
RTSP request string was badly misformed/noncompliant.)
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list