]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_iax2.c: Ensure all IEs are displayed when dumping frame contents.
authorSean Bright <sean@seanbright.com>
Mon, 6 Nov 2023 16:45:33 +0000 (11:45 -0500)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:32:13 +0000 (18:32 +0000)
When IAX2 debugging was enabled (`iax2 set debug on`), if the last IE
in a frame was one that may not have any data - such as the CALLTOKEN
IE in an NEW request - it was not getting displayed.

(cherry picked from commit 19507ae160f796363a7332276c5d5628e2e84b0e)

channels/iax2/parser.c

index 571a677fec0fff116ad42948b57ae16dc5cc38cd..449cd1b9ca8588e71d057ae640fedb6d4d4a5fb8 100644 (file)
@@ -424,7 +424,7 @@ static void dump_ies(unsigned char *iedata, int len)
 
        if (len < 2)
                return;
-       while(len > 2) {
+       while(len >= 2) {
                ie = iedata[0];
                ielen = iedata[1];
                if (ielen + 2> len) {