From: Sean Bright Date: Mon, 6 Nov 2023 16:45:33 +0000 (-0500) Subject: chan_iax2.c: Ensure all IEs are displayed when dumping frame contents. X-Git-Tag: 18.21.0-rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=311ae8086043754420973ee29d4c39a0a229c06d;p=thirdparty%2Fasterisk.git chan_iax2.c: Ensure all IEs are displayed when dumping frame contents. 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 744bd4f9ac83322a7e779f572a35a33718848a54) --- diff --git a/channels/iax2/parser.c b/channels/iax2/parser.c index 571a677fec..449cd1b9ca 100644 --- a/channels/iax2/parser.c +++ b/channels/iax2/parser.c @@ -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) {