]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 250246 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Wed, 3 Mar 2010 00:22:22 +0000 (00:22 +0000)
committerDavid Vossel <dvossel@digium.com>
Wed, 3 Mar 2010 00:22:22 +0000 (00:22 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r250246 | dvossel | 2010-03-02 18:18:28 -0600 (Tue, 02 Mar 2010) | 2 lines

  fixes signed to unsigned int comparision issue for FaxMaxDatagram value.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@250265 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a009299019fb3d8a931e4a7e2f1664b01b44b67c..9e797e7d6f4945923275cad7bf02a2b839bd0518 100644 (file)
@@ -7912,7 +7912,7 @@ static int process_sdp_a_image(const char *a, struct sip_pvt *p)
                found = TRUE;
        } else if ((sscanf(a, "T38FaxMaxDatagram:%30u", &x) == 1) || (sscanf(a, "T38MaxDatagram:%30u", &x) == 1)) {
                /* override the supplied value if the configuration requests it */
-               if (p->t38_maxdatagram > x) {
+               if (((signed int) p->t38_maxdatagram >= 0) && ((unsigned int) p->t38_maxdatagram > x)) {
                        ast_debug(1, "Overriding T38FaxMaxDatagram '%d' with '%d'\n", x, p->t38_maxdatagram);
                        x = p->t38_maxdatagram;
                }