]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoiding buffer overflow in silly iax lib
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Sep 2009 21:49:55 +0000 (21:49 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Sep 2009 21:49:55 +0000 (21:49 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14910 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_iax/iax2-parser.c

index 80a9d80af0c455550da7bda3854fede83f90bc68..df2f82a64c0de1400249623a94fceae97b3cf75e 100644 (file)
@@ -363,6 +363,8 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
                "FWDOWNLD",
                "FWDATA"
        };
+
+
        const char *cmds[] = {
                "(0?)",
                "HANGUP ",
@@ -370,9 +372,26 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
                "RINGING",
                "ANSWER ",
                "BUSY   ",
-               "TKOFFHK ",
-               "OFFHOOK"
+               "TKOFFHK",
+               "OFFHOOK",
+               "CONGSTN",
+               "FLASH  ",
+               "WINK   ",
+               "OPTION ",
+               "RDKEY  ",
+               "RDUNKEY",
+               "PROGRES",
+               "PROCDNG",
+               "HOLD   ",
+               "UNHOLD ",
+               "VIDUPDT",
+               "T38    ",
+               "SRCUPDT",
+               "TXFER  ",
+               "CNLINE ",
+               "REDIR  ",
        };
+
        struct ast_iax2_full_hdr *fh;
        char retries[20];
        char class2[20];
@@ -423,14 +442,6 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
                subclass = subclass2;
        }
 
-       if (!subclass) {
-               subclass = "";
-       }
-
-       if (!class) {
-               class = "";
-       }
-
        snprintf(tmp, (int) sizeof(tmp),
                         "%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s Subclass: %s\n",
                         (rx ? "Rx" : "Tx"), retries, fh->oseqno, fh->iseqno, class, subclass);