]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Remove a contradiction
authorTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 05:53:55 +0000 (05:53 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 06:38:30 +0000 (06:38 +0000)
base64_d returns a value of size_t, which is unsigned.  The value
therefore cannot be less than zero.  The second check testing whether
it is >= INT_MAX is not a contradiction, but it doesn't make any sense
to check for this (as far as I can tell).

libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c

index 830603f16997005d679aa5982f7acbe186af3028..0814c8c780670dc4ecd3029c9aa30b60902e7704 100644 (file)
@@ -535,8 +535,6 @@ void auth_method_basic(auth_mod_t *am,
     if (!au->au_params)
       continue;
     n = base64_d(userpass, upsize - 1, au->au_params[0]);
-    if (n < 0 || n >= INT_MAX)
-      continue;
     if (n >= upsize) {
       void *b = realloc(userpass == buffer ? NULL : userpass, upsize = n + 1);
       if (b == NULL)