From 862667f7e70b5c58384d3792c3750fe99be83cf6 Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Tue, 10 Jan 2017 11:20:20 -0600
Subject: [PATCH] FS-9929: [core,mod_spandsp] Assert in switch_frame_buffer_dup
 when receiving a fax using t.38 #resolve

---
 src/mod/applications/mod_spandsp/mod_spandsp_fax.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c
index 81dabb3f44..acb707588a 100644
--- a/src/mod/applications/mod_spandsp/mod_spandsp_fax.c
+++ b/src/mod/applications/mod_spandsp/mod_spandsp_fax.c
@@ -640,6 +640,7 @@ static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uin
 	/* we need to build a real packet here and make write_frame.packet and write_frame.packetlen point to it */
 	out_frame.flags = SFF_UDPTL_PACKET | SFF_PROXY_PACKET;
 	out_frame.packet = pkt;
+	out_frame.buflen = LOCAL_FAX_MAX_DATAGRAM;
 	if ((r = udptl_build_packet(pvt->udptl_state, pkt, buf, len)) > 0) {
 		out_frame.packetlen = r;
 		//switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "WRITE %d udptl bytes\n", out_frame.packetlen);