diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-28 07:53:47 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-11-28 07:53:47 +0000 |
commit | db86c203b75aa4863021aaa2a409f90ee97fb934 (patch) | |
tree | 2682abc0653397805569fce446da6fa4ec7f3619 | |
parent | a597ecafa00e4e41c18de39003967556b0eb472d (diff) |
more null-checking.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3309 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/syldap.c | 4 | ||||
-rw-r--r-- | src/vcard.c | 2 |
3 files changed, 12 insertions, 3 deletions
@@ -1,5 +1,14 @@ 2013-11-28 + * src/syldap.c: + syldap_test_connect(): + syldap_read_basedn(): + NULL check argument first. + * src/vcard.c: vcard_build_items(): dereference nodeRemarks only if + it's non-null. + +2013-11-28 + * src/rpop3.c: rpop3_retr_recv(): check error of procheader_parse_file(). diff --git a/src/syldap.c b/src/syldap.c index dd46b5ca..6c609ad0 100644 --- a/src/syldap.c +++ b/src/syldap.c @@ -891,8 +891,8 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) { gchar **vals; struct timeval timeout; - ldapServer->retVal = MGU_BAD_ARGS; if( ldapServer == NULL ) return baseDN; + ldapServer->retVal = MGU_BAD_ARGS; if( ldapServer->hostName == NULL ) return baseDN; if( ldapServer->port < 1 ) return baseDN; @@ -1041,8 +1041,8 @@ gboolean syldap_test_connect( SyldapServer *ldapServer ) { gboolean retVal = FALSE; LDAP *ld; - ldapServer->retVal = MGU_BAD_ARGS; if( ldapServer == NULL ) return retVal; + ldapServer->retVal = MGU_BAD_ARGS; if( ldapServer->hostName == NULL ) return retVal; if( ldapServer->port < 1 ) return retVal; ldapServer->retVal = MGU_LDAP_INIT; diff --git a/src/vcard.c b/src/vcard.c index a078607b..dd7219a6 100644 --- a/src/vcard.c +++ b/src/vcard.c @@ -384,8 +384,8 @@ static void vcard_build_items( VCardFile *cardFile, GSList *listName, GSList *li if( *str != '\0' ) { ItemEMail *email = addritem_create_item_email(); addritem_email_set_address( email, str ); - str = nodeRemarks->data; if( nodeRemarks ) { + str = nodeRemarks->data; if( str ) { if( g_ascii_strcasecmp( str, "internet" ) != 0 ) { if( *str != '\0' ) addritem_email_set_remarks( email, str ); |