Mercurial > pidgin.yaz
changeset 13493:e8b0a9376481
[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 <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 13 Mar 2006 17:57:34 +0000 |
parents | 59ea9ddd408b |
children | 2d1ccccde3d4 |
files | plugins/log_reader.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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) {