From: <rl...@us...> - 2006-04-20 05:12:32
|
Revision: 16070 Author: rlaager Date: 2006-04-19 22:12:22 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16070&view=rev Log Message: ----------- CID 104: Function: trillian_logger_list Description: Variable "data" tracked as NULL was dereferenced. Yet another reminder that I need to work on this plugin again. Modified Paths: -------------- trunk/plugins/log_reader.c Modified: trunk/plugins/log_reader.c =================================================================== --- trunk/plugins/log_reader.c 2006-04-20 04:58:29 UTC (rev 16069) +++ trunk/plugins/log_reader.c 2006-04-20 05:12:22 UTC (rev 16070) @@ -1131,17 +1131,17 @@ *c = '\0'; if (gaim_str_has_prefix(line, "Session Close ")) { - if (data && !data->length) - data->length = last_line_offset - data->offset; - if (!data->length) { - /* This log had no data, so we remove it. */ - GList *last = g_list_last(list); + if (data && !data->length) { + if (!(data->length = last_line_offset - data->offset)) { + /* This log had no data, so we remove it. */ + GList *last = g_list_last(list); - gaim_debug(GAIM_DEBUG_INFO, "Trillian log list", - "Empty log. Offset %i\n", data->offset); + gaim_debug(GAIM_DEBUG_INFO, "Trillian log list", + "Empty log. Offset %i\n", data->offset); - trillian_logger_finalize((GaimLog *)last->data); - list = g_list_delete_link(list, last); + trillian_logger_finalize((GaimLog *)last->data); + list = g_list_delete_link(list, last); + } } } else if (line[0] && line[1] && line [3] && gaim_str_has_prefix(&line[3], "sion Start ")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-08-11 02:20:23
|
Revision: 16698 Author: datallah Date: 2006-08-10 19:20:18 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16698&view=rev Log Message: ----------- CID 218 Also a win32 compile fix. Modified Paths: -------------- trunk/plugins/log_reader.c Modified: trunk/plugins/log_reader.c =================================================================== --- trunk/plugins/log_reader.c 2006-08-11 02:02:53 UTC (rev 16697) +++ trunk/plugins/log_reader.c 2006-08-11 02:20:18 UTC (rev 16698) @@ -900,7 +900,7 @@ !isalnum(*(from_name + alias_length))); - to_name_matches = (gaim_str_has_prefix( + to_name_matches = to_name && (gaim_str_has_prefix( to_name, alias) && !isalnum(*(to_name + alias_length))); @@ -1682,6 +1682,7 @@ char buffer[1024] = ""; DWORD size = (sizeof(buffer) - 1); DWORD type; + gboolean found = FALSE; path = NULL; /* TODO: Test this after removing the trailing "\\". */ @@ -1720,20 +1721,18 @@ if (!path) { char *folder = wgaim_get_special_folder(CSIDL_PROGRAM_FILES); - if (folder) + if (folder) { path = g_build_filename(folder, "Trillian", "users", "default", "talk.ini", NULL); g_free(folder); } } - gboolean found = FALSE; - if (path) { /* Read talk.ini file to find the log directory. */ GError *error = NULL; -#if 0 && GTK_CHECK_VERSION(2,6,0) /* FIXME: Not tested yet. */ +#if 0 && GLIB_CHECK_VERSION(2,6,0) /* FIXME: Not tested yet. */ GKeyFile *key_file; gaim_debug(GAIM_DEBUG_INFO, "Trillian talk.ini read", @@ -1760,9 +1759,9 @@ g_key_file_free(key_file); } -#else /* !GTK_CHECK_VERSION(2,6,0) */ - GError *error = NULL; +#else /* !GLIB_CHECK_VERSION(2,6,0) */ gsize length; + gchar *contents = NULL; gaim_debug(GAIM_DEBUG_INFO, "Trillian talk.ini read", "Reading %s\n", path); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-08-11 03:01:23
|
Revision: 16701 Author: datallah Date: 2006-08-10 20:01:14 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16701&view=rev Log Message: ----------- leak fix Modified Paths: -------------- trunk/plugins/log_reader.c Modified: trunk/plugins/log_reader.c =================================================================== --- trunk/plugins/log_reader.c 2006-08-11 02:42:13 UTC (rev 16700) +++ trunk/plugins/log_reader.c 2006-08-11 03:01:14 UTC (rev 16701) @@ -790,6 +790,7 @@ time_t time_unix; struct tm *tm_new; char *timestamp; + char *tmp; const char *style; new_session_id = xmlnode_get_attrib(message, "SessionID"); @@ -982,16 +983,18 @@ style = xmlnode_get_attrib(text_node, "Style"); + tmp = xmlnode_get_data(text_node); if (style && *style) { text = g_string_append(text, "<span style=\""); text = g_string_append(text, style); text = g_string_append(text, "\">"); - text = g_string_append(text, xmlnode_get_data(text_node)); + text = g_string_append(text, tmp); text = g_string_append(text, "</span>\n"); } else { - text = g_string_append(text, xmlnode_get_data(text_node)); + text = g_string_append(text, tmp); text = g_string_append(text, "\n"); } + g_free(tmp); } data->text = text; @@ -1462,7 +1465,7 @@ g_string_append(formatted, "<span style=\"color: #ff0000;\">"); - + if (gaim_str_has_prefix(line, "Your previous message has not been sent. " "Reason: Maximum length exceeded.")) { @@ -1686,7 +1689,7 @@ path = NULL; /* TODO: Test this after removing the trailing "\\". */ - if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, "Trillian.SkinZip\\shell\\Add\\command\\", + if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, "Trillian.SkinZip\\shell\\Add\\command\\", 0, KEY_QUERY_VALUE, &hKey)) { if(ERROR_SUCCESS == RegQueryValueEx(hKey, "", NULL, &type, (LPBYTE)buffer, &size)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-08-14 00:08:19
|
Revision: 16740 Author: datallah Date: 2006-08-13 17:08:15 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16740&view=rev Log Message: ----------- Fix for CID 97 Modified Paths: -------------- trunk/plugins/log_reader.c Modified: trunk/plugins/log_reader.c =================================================================== --- trunk/plugins/log_reader.c 2006-08-13 23:30:19 UTC (rev 16739) +++ trunk/plugins/log_reader.c 2006-08-14 00:08:15 UTC (rev 16740) @@ -857,11 +857,10 @@ * friendly name or alias. For this test, "match" is defined as: * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$ */ - from_name_matches = from_name != NULL && ( - (gaim_str_has_prefix(from_name, friendly_name) && + from_name_matches = (gaim_str_has_prefix(from_name, friendly_name) && !isalnum(*(from_name + friendly_name_length))) || (gaim_str_has_prefix(from_name, log->account->alias) && - !isalnum(*(from_name + alias_length)))); + !isalnum(*(from_name + alias_length))); to_name_matches = to_name != NULL && ( (gaim_str_has_prefix(to_name, friendly_name) && @@ -930,10 +929,11 @@ !isalnum(*(from_name + friendly_name_length))); - to_name_matches = (gaim_str_has_prefix( + to_name_matches = to_name && ( + (gaim_str_has_prefix( to_name, buddy->server_alias) && !isalnum(*(to_name + - friendly_name_length))); + friendly_name_length)))); if (from_name_matches) { if (!to_name_matches) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |