[Freeswitch-svn] [commit] r11779 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/iptsec libsofia-sip-ua/iptsec/sofia-sip
FreeSWITCH SVN
mikej at freeswitch.org
Wed Feb 11 08:18:36 PST 2009
Author: mikej
Date: Wed Feb 11 10:18:36 2009
New Revision: 11779
Log:
Thu Jan 8 13:04:03 CST 2009 Pekka Pessi <first.last at nokia.com>
* auth_client: do not crash with unknown authentication schemes
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Wed Feb 11 10:18:36 2009
@@ -1 +1 @@
-Wed Feb 11 10:16:40 CST 2009
+Wed Feb 11 10:18:18 CST 2009
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c Wed Feb 11 10:18:36 2009
@@ -128,11 +128,17 @@
if (!matched) {
/* There was no matching authenticator, create a new one */
*cca = ca_create(home, scheme, realm);
- if (ca_challenge((*cca), ch, crcl, scheme, realm) < 0) {
+
+ if (*cca == NULL) {
+ return -1;
+ }
+ else if (ca_challenge((*cca), ch, crcl, scheme, realm) < 0) {
ca_destroy(home, *cca), *cca = NULL;
return -1;
}
- retval = 1; /* Updated authenticator */
+ /* XXX - case w/ unknown authentication scheme */
+ else
+ retval = 1; /* Updated authenticator */
}
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h Wed Feb 11 10:18:36 2009
@@ -98,7 +98,8 @@
/** Check if authentication client has been extended. @NEW_1_12_6. */
#define AUTH_CLIENT_IS_EXTENDED(ca) \
- ((ca)->ca_auc->auc_plugin_size > \
+ ((ca)->ca_auc && \
+ (ca)->ca_auc->auc_plugin_size > \
(int)offsetof(auth_client_plugin_t, auc_clear) \
&& (ca)->ca_auc->auc_clear != NULL)
More information about the Freeswitch-svn
mailing list