[vlc-devel] [PATCH 05/13] modules/access/rtsp: fixed endless iteration on unexpected data
Filip Roséen
filip at atch.se
Thu Feb 25 10:12:31 CET 2016
Given the below (example) correspondance with a remote-server, the
module will iterate endlessly since we never move to the next line to
process.
% nc -l -p 8080 <<EOF
> RTSP/1.0 200 OK
> CSeq: 1
> Server: Real
> RealChallenge1: foobar
>
> RTSP/1.0 200 OK
> CSeq: 1
> ETag: hello world
> Content-Length: 5
>
> m=123
>
The important line is `m=123`.
---
modules/access/rtsp/real_sdpplin.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/access/rtsp/real_sdpplin.c b/modules/access/rtsp/real_sdpplin.c
index 341efd7..0f56ce8 100644
--- a/modules/access/rtsp/real_sdpplin.c
+++ b/modules/access/rtsp/real_sdpplin.c
@@ -211,7 +211,8 @@ sdpplin_t *sdpplin_parse(access_t *p_access, char *data)
if (filter(p_access, data, "m=", &buf, BUFLEN)) {
if ( !desc->stream ) {
- fprintf(stderr, "sdpplin.c: stream identifier found before stream count, skipping.");
+ msg_Warn(p_access, "sdpplin.c: stream identifier found before stream count, skipping.");
+ data = nl(data);
continue;
}
stream=sdpplin_parse_stream(p_access, &data);
--
2.7.1
More information about the vlc-devel
mailing list