Commit f7f9673a authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

realrtsptsp: fixed endless iteration on unexpected data

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
>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1831e930
...@@ -211,7 +211,8 @@ sdpplin_t *sdpplin_parse(access_t *p_access, char *data) ...@@ -211,7 +211,8 @@ sdpplin_t *sdpplin_parse(access_t *p_access, char *data)
if (filter(p_access, data, "m=", &buf, BUFLEN)) { if (filter(p_access, data, "m=", &buf, BUFLEN)) {
if ( !desc->stream ) { 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; continue;
} }
stream=sdpplin_parse_stream(p_access, &data); stream=sdpplin_parse_stream(p_access, &data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment