Thu May 22 10:38:36 EDT 2008 Pekka.Pessi@nokia.com
* auth_module.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8637 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f816f01efe
commit
2caded0dec
|
@ -1 +1 @@
|
|||
Sun May 25 11:21:21 EDT 2008
|
||||
Sun May 25 11:21:50 EDT 2008
|
||||
|
|
|
@ -537,11 +537,10 @@ void auth_method_basic(auth_mod_t *am,
|
|||
if (n < 0 || n >= INT_MAX)
|
||||
continue;
|
||||
if (n >= upsize) {
|
||||
upsize = n + 1;
|
||||
userpass = realloc(userpass == buffer ? NULL : userpass, upsize);
|
||||
if (userpass == NULL)
|
||||
continue;
|
||||
base64_d(userpass, upsize - 1, au->au_params[0]);
|
||||
void *b = realloc(userpass == buffer ? NULL : userpass, upsize = n + 1);
|
||||
if (b == NULL)
|
||||
break;
|
||||
base64_d(userpass = b, upsize - 1, au->au_params[0]);
|
||||
}
|
||||
userpass[n] = 0;
|
||||
if (!(pass = strchr(userpass, ':')))
|
||||
|
@ -1079,13 +1078,15 @@ int auth_readdb_internal(auth_mod_t *am, int always)
|
|||
if (!*pass || !*user)
|
||||
continue;
|
||||
|
||||
realm = ""; ident = "";
|
||||
|
||||
if ((realm = strchr(pass, ':'))) {
|
||||
if ((realm = strchr(pass, ':')))
|
||||
*realm++ = '\0';
|
||||
else
|
||||
realm = "";
|
||||
|
||||
if ((ident = strchr(realm, ':')))
|
||||
*ident++ = '\0';
|
||||
}
|
||||
else
|
||||
ident = "";
|
||||
|
||||
apw = fresh + i++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue