Commit ce68b58c authored by Pavlov Konstantin's avatar Pavlov Konstantin

Fix another problem in realrtsp (ported from xine-lib upstream):

* Fix invalid memory access in Real Media SDP with tailored stream; reported
by Roland Kay. [bug #1602631]

CVS patchset: 8442
CVS date: 2006/12/25 16:21:56
parent b0e2e3b8
...@@ -233,12 +233,19 @@ sdpplin_t *sdpplin_parse(char *data) { ...@@ -233,12 +233,19 @@ sdpplin_t *sdpplin_parse(char *data) {
free( desc ); free( desc );
return NULL; return NULL;
} }
desc->stream = NULL;
memset(desc, 0, sizeof(sdpplin_t)); memset(desc, 0, sizeof(sdpplin_t));
while (data && *data) { while (data && *data) {
handled=0; handled=0;
if (filter(data, "m=", &buf)) { if (filter(data, "m=", &buf)) {
if ( !desc->stream ) {
fprintf(stderr, "sdpplin.c: stream identifier found before stream count, skipping.");
continue;
}
stream=sdpplin_parse_stream(&data); stream=sdpplin_parse_stream(&data);
lprintf("got data for stream id %u\n", stream->stream_id); lprintf("got data for stream id %u\n", stream->stream_id);
desc->stream[stream->stream_id]=stream; desc->stream[stream->stream_id]=stream;
......
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