From: Darko Koruga Date: Fri, 10 Jan 2003 06:41:52 +0000 (+0000) Subject: Fix crash when importing pine addressbook (reported on ML by dybulk@tri8.net). X-Git-Tag: rel_0_8_9~76 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=ae8863f5c0cdbca81495fea7ba8d4dd695af61b2 Fix crash when importing pine addressbook (reported on ML by dybulk@tri8.net). --- diff --git a/ChangeLog.claws b/ChangeLog.claws index feeaae756..7b3cf9939 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2003-01-10 [darko] 0.8.8claws73 + + * src/pine.c + fix crash when importing address book entry + without a valid address + 2003-01-09 [alfons] 0.8.8claws72 * src/inc.c diff --git a/configure.in b/configure.in index 660e894ca..1f78d87d2 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws72 +EXTRA_VERSION=claws73 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/pine.c b/src/pine.c index c2096ac55..7dac93ca9 100644 --- a/src/pine.c +++ b/src/pine.c @@ -414,6 +414,8 @@ static void pine_parse_address( PineFile *pineFile, AddressCache *cache, Pine_Pa gchar *name; gint len; + g_return_if_fail( rec->address != NULL ); + buf = rec->address; while((atCh = strchr( buf, CHAR_AT )) != NULL) { name = pine_parse_name( buf, atCh, &bp, &ep ); @@ -450,6 +452,8 @@ static ItemEMail *pine_insert_table( ItemEMail *email; gchar *key; + g_return_if_fail( address != NULL ); + /* Test whether address already in hash table */ key = g_strdup( address ); g_strdown( key );