On Mon, 19 Jan 2015, Luca Barbato wrote:
On 18/01/15 21:09, Julius Friedman wrote:
Re guarding two things:
1) -
I take you are referring to:
http://git.libav.org/?p=libav.git;a=blob;f=libavformat/rtsp.c;h=2200f6ec0709ebd1167d271e165b2420a68ccaa1;hb=HEAD#l1103
'rtsp_read_reply' - Seems to handle incorrectly the parsing of messages
during an interleaved communication, it also incorrectly looks for '$' when
it may not be used by the underlying transport e.g. in UDP.
Please consider a message which is formulated with a header like such:
"GET_PARAMATER rtsp://someuri/ RTSP/1.0\r\nCSeq:1\r\nDate:
xx:xx:xx\r\nContent-Length:24\r\n$UserAgent $009\r\n$\0\0\aRTSP/1.$\0\0\r\
n\r\nDatawith$IsNotAGoodIdea!\0\0"
Probably we can just add a condition there and be done with that. Martin
do you see something against it?
Perhaps, although I'm not sure what the issue that Julius is referring to
is. If you receive invalid headers (with header lines starting with $),
yes, you will not have a working end result. The code should not crash (if
it does, that's of course a bug), and it should not hang infinitely (at
least the interrupt callback should be able to stop it). If you aren't
able to play it back, then that's pretty much expected if you pass invalid
headers (although perhaps we can make it more tolerant - but then the
issue should be labelled as "make it more tolerant to broken data", not as
"rtsp.c has a bug"). Or can Julius clarify exactly what the issue is that
he is referring to? (E.g. actual behaviour vs expected behaviour).
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel