]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5286 we can try this for added protection
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Apr 2013 14:19:47 +0000 (09:19 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Apr 2013 14:19:47 +0000 (09:19 -0500)
src/mod/applications/mod_spandsp/mod_spandsp_fax.c

index 0b0ba8a557d2a45dc9b588d4149052dd5d65e545..b82a68bc76c3058c9f8e373d16566d7925f14e9f 100644 (file)
@@ -1486,7 +1486,7 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat
                                        continue;
                                }
        
-                               if (switch_test_flag(read_frame, SFF_UDPTL_PACKET)) {
+                               if (switch_test_flag(read_frame, SFF_UDPTL_PACKET) && read_frame->packet && read_frame->packetlen) {
                                        /* now we know we can cast frame->packet to a udptl structure */
                                        //switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "READ %d udptl bytes\n", read_frame->packetlen);