# HG changeset patch # User Richard Laager # Date 1142272654 0 # Node ID e8b0a93764819129d88c031114f6ec9ea55984e4 # Parent 59ea9ddd408b9a98fefa415e888c71076f97cab0 [gaim-migrate @ 15869] Resolves CID 97 'Variable "to_name" tracked as NULL was dereferenced.' I also applied the same change to the from_name code. committer: Tailor Script diff -r 59ea9ddd408b -r e8b0a9376481 plugins/log_reader.c --- a/plugins/log_reader.c Mon Mar 13 17:54:14 2006 +0000 +++ b/plugins/log_reader.c Mon Mar 13 17:57:34 2006 +0000 @@ -856,17 +856,17 @@ * friendly name or alias. For this test, "match" is defined as: * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$ */ - from_name_matches = ((g_str_has_prefix( - from_name, friendly_name) && - !isalnum(*(from_name + friendly_name_length))) || - (g_str_has_prefix(from_name, log->account->alias) && - !isalnum(*(from_name + alias_length)))); + from_name_matches = from_name != NULL && ( + (g_str_has_prefix(from_name, friendly_name) && + !isalnum(*(from_name + friendly_name_length))) || + (g_str_has_prefix(from_name, log->account->alias) && + !isalnum(*(from_name + alias_length)))); - to_name_matches = ((g_str_has_prefix( - to_name, friendly_name) && - !isalnum(*(to_name + friendly_name_length))) || - (g_str_has_prefix(to_name, log->account->alias) && - !isalnum(*(to_name + alias_length)))); + to_name_matches = to_name != NULL && ( + (gaim_str_has_prefix(to_name, friendly_name) && + !isalnum(*(to_name + friendly_name_length))) || + (gaim_str_has_prefix(to_name, log->account->alias) && + !isalnum(*(to_name + alias_length)))); if (from_name_matches) { if (!to_name_matches) {