]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
backport change from the iaxclient sf repository rev 567
authorMichael Jerris <mike@jerris.com>
Fri, 11 May 2007 17:04:24 +0000 (17:04 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 11 May 2007 17:04:24 +0000 (17:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5153 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/iax/src/iax.c

index 54a18515a88e6016b9d6e722b6699e88701bedbd..6bafc65d130c1ac2fa2e8e0b6a957dd6d3665909 100644 (file)
@@ -2993,6 +2993,7 @@ struct iax_event *iax_net_process(unsigned char *buf, int len, struct sockaddr_i
                if (len < sizeof(struct ast_iax2_full_hdr)) {
                        DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr));
                        IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr));
+                       return NULL;
                }
                /* Only allow it to make new sessions on types where that makes sense */
                if ((fh->type == AST_FRAME_IAX) && ((subclass == IAX_COMMAND_NEW) ||
@@ -3015,6 +3016,7 @@ struct iax_event *iax_net_process(unsigned char *buf, int len, struct sockaddr_i
                if (len < sizeof(struct ast_iax2_mini_hdr)) {
                        DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr));
                        IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr));
+                       return NULL;
                }
                /* Miniature, voice frame */
                session = iax_find_session(sin, ntohs(fh->scallno), 0, 0);