mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
rtp: Introduce pa_rtsp_exec_ready()
In the current RTSP implementation, there is a vulnerable window between the RTSP object creation and the URL initialization. If any RTSP command is issued during this period, it will lead to crash by assertion violation. This patch introduces pa_rtsp_exec_ready(), which returns if it is safe to issue RTSP commands. Reviewed-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
60a1c27517
commit
19873dff0a
2 changed files with 8 additions and 0 deletions
|
|
@ -389,6 +389,12 @@ void pa_rtsp_remove_header(pa_rtsp_client *c, const char *key) {
|
|||
pa_headerlist_remove(c->headers, key);
|
||||
}
|
||||
|
||||
bool pa_rtsp_exec_ready(const pa_rtsp_client *c) {
|
||||
pa_assert(c);
|
||||
|
||||
return c->url != NULL && c->ioline != NULL;
|
||||
}
|
||||
|
||||
static int rtsp_exec(pa_rtsp_client *c, const char *cmd,
|
||||
const char *content_type, const char *content,
|
||||
int expect_response,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue