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).
This commit is contained in:
Travis Cross 2012-06-25 05:53:55 +00:00
parent 76a26648d4
commit 5077384c5b

View 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)