[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 195/256: rtsp: Segfault in rtsp.c when using WRITED
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 195/256: rtsp: Segfault in rtsp.c when using WRITEDATA |
Date: |
Fri, 06 Oct 2017 19:44:46 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 08dbed31d5453f883928f2779f22bda8b246a228
Author: Max Dymond <address@hidden>
AuthorDate: Tue Sep 12 19:45:19 2017 +0100
rtsp: Segfault in rtsp.c when using WRITEDATA
If the INTERLEAVEFUNCTION is defined, then use that plus the
INTERLEAVEDATA information when writing RTP. Otherwise, use
WRITEFUNCTION and WRITEDATA.
Fixes #1880
Closes #1884
---
lib/rtsp.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/lib/rtsp.c b/lib/rtsp.c
index 99ec5f4dc..925da2c1a 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.c
@@ -749,23 +749,28 @@ CURLcode rtp_client_write(struct connectdata *conn, char
*ptr, size_t len)
struct Curl_easy *data = conn->data;
size_t wrote;
curl_write_callback writeit;
+ void *user_ptr;
if(len == 0) {
failf(data, "Cannot write a 0 size RTP packet.");
return CURLE_WRITE_ERROR;
}
- writeit = data->set.fwrite_rtp?data->set.fwrite_rtp:data->set.fwrite_func;
-
- if(!data->set.fwrite_rtp && !data->set.is_fwrite_set &&
- !data->set.rtp_out) {
- /* if no callback is set for either RTP or default, the default function
- fwrite() is utilized and that can't handle a NULL input */
- failf(data, "No destination to default data callback!");
- return CURLE_WRITE_ERROR;
+ /* If the user has configured CURLOPT_INTERLEAVEFUNCTION then use that
+ function and any configured CURLOPT_INTERLEAVEDATA to write out the RTP
+ data. Otherwise, use the CURLOPT_WRITEFUNCTION with the CURLOPT_WRITEDATA
+ pointer to write out the RTP data. */
+ if(data->set.fwrite_rtp) {
+ writeit = data->set.fwrite_rtp;
+ user_ptr = data->set.rtp_out;
+ }
+ else
+ {
+ writeit = data->set.fwrite_func;
+ user_ptr = data->set.out;
}
- wrote = writeit(ptr, 1, len, data->set.rtp_out);
+ wrote = writeit(ptr, 1, len, user_ptr);
if(CURL_WRITEFUNC_PAUSE == wrote) {
failf(data, "Cannot pause RTP");
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 72/256: axtls: reorder functions topologically, (continued)
- [GNUnet-SVN] [gnurl] 72/256: axtls: reorder functions topologically, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 165/256: HISTORY: added some recent items, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 132/256: tool_formparse: fix some trivial warnings, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 35/256: mailmap: de-duplify some git authors, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 221/256: imap: quote atoms properly when escaping characters, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 219/256: vtls: provide curl_global_sslset() even in non-SSL builds, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 217/256: openssl: only verify RSA private key if supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 59/256: darwinssl: handle long strings in TLS certs, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 73/256: schannel: reorder functions topologically, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 69/256: vtls: move sha256sum into the Curl_ssl struct, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 195/256: rtsp: Segfault in rtsp.c when using WRITEDATA,
gnunet <=
- [GNUnet-SVN] [gnurl] 253/256: build-openssl.bat: Warn OpenSSL 1.1.0 not yet supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 30/256: metalink: adjust source code style, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 149/256: docs/curl_mime_*.3: added examples, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 93/256: configure: allow setting the default SSL backend, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 224/256: metalink: fix NSS issue in MultiSSL builds, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 198/256: non-ascii: use iconv() with 'char **' argument, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 136/256: RELEASE-NOTES: synced with 1ab9e9b50, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 189/256: code style: remove wrong uses of multiple spaces, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 166/256: travis: add c-ares enabled builds linux + osx, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 237/256: cookie: fix memory leak on oversized rejection, gnunet, 2017/10/06