]> 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:20:19 +0000 (09:20 -0500)
src/mod/applications/mod_spandsp/mod_spandsp_fax.c

index 8504fda1d5c89cb03c8b97d8f32282a720186a06..0ff57ccc02791d066a785b4e5ba520864332cf4f 100644 (file)
@@ -1484,7 +1484,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);