From: David Vossel Date: Wed, 3 Mar 2010 00:18:28 +0000 (+0000) Subject: fixes signed to unsigned int comparision issue for FaxMaxDatagram value. X-Git-Tag: 11.0.0-beta1~3342 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba1a8d3ff04f46643c81efd54ef195ca588f1f78;p=thirdparty%2Fasterisk.git fixes signed to unsigned int comparision issue for FaxMaxDatagram value. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250246 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9944c00fdd..cb7fba9d76 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7557,7 +7557,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; }