summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_fax_spandsp.c10
-rw-r--r--res/res_rtp_asterisk.c5
2 files changed, 9 insertions, 6 deletions
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c
index 288f91dac..42492273d 100644
--- a/res/res_fax_spandsp.c
+++ b/res/res_fax_spandsp.c
@@ -48,14 +48,16 @@
<support_level>extended</support_level>
***/
-#include "asterisk.h"
-
-ASTERISK_REGISTER_FILE()
-
+/* Include spandsp headers before asterisk.h so the inline functions can continue using
+ * malloc and free, even with MALLOC_DEBUG enabled. */
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
#include <spandsp.h>
#include <spandsp/version.h>
+#include "asterisk.h"
+
+ASTERISK_REGISTER_FILE()
+
#include "asterisk/logger.h"
#include "asterisk/module.h"
#include "asterisk/strings.h"
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index de75626e2..1d43681e4 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2016,8 +2016,9 @@ static int __rtp_recvfrom(struct ast_rtp_instance *instance, void *buf, size_t s
#ifdef HAVE_OPENSSL_SRTP
dtls_srtp_check_pending(instance, rtp, rtcp);
- /* If this is an SSL packet pass it to OpenSSL for processing */
- if ((*in >= 20) && (*in <= 64)) {
+ /* If this is an SSL packet pass it to OpenSSL for processing. RFC section for first byte value:
+ * https://tools.ietf.org/html/rfc5764#section-5.1.2 */
+ if ((*in >= 20) && (*in <= 63)) {
struct dtls_details *dtls = !rtcp ? &rtp->dtls : &rtp->rtcp->dtls;
int res = 0;