[Freeswitch-svn] [commit] r8637 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/iptsec
Freeswitch SVN
mikej at freeswitch.org
Sun May 25 11:22:16 EDT 2008
Author: mikej
Date: Sun May 25 11:22:16 2008
New Revision: 8637
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c
Log:
Thu May 22 10:38:36 EDT 2008 Pekka.Pessi at nokia.com
* auth_module.c: fixed klocwork issues
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Sun May 25 11:22:16 2008
@@ -1 +1 @@
-Sun May 25 11:21:21 EDT 2008
+Sun May 25 11:21:50 EDT 2008
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c Sun May 25 11:22:16 2008
@@ -537,11 +537,10 @@
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 @@
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++;
More information about the Freeswitch-svn
mailing list