diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 58edbe3b6c..f92f0bbd2e 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:21:21 EDT 2008 +Sun May 25 11:21:50 EDT 2008 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 0e4b08a87b..a4148b43d8 100644 --- a/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c +++ b/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c @@ -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'; - if ((ident = strchr(realm, ':'))) - *ident++ = '\0'; - } + else + realm = ""; + + if ((ident = strchr(realm, ':'))) + *ident++ = '\0'; + else + ident = ""; apw = fresh + i++;