From 5077384c5bdbc0571bcedb482112c1a0d40f495f Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 25 Jun 2012 05:53:55 +0000 Subject: [PATCH] Remove a contradiction 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c b/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c index 830603f169..0814c8c780 100644 --- a/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c +++ b/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c @@ -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)