summaryrefslogtreecommitdiff
path: root/libpurple/plugins/log_reader.c
diff options
context:
space:
mode:
authorMichael Shkutkov <mshkutkov@soc.pidgin.im>2007-06-17 21:03:22 +0000
committerMichael Shkutkov <mshkutkov@soc.pidgin.im>2007-06-17 21:03:22 +0000
commit65400f6ba8868eac81beff77c19a3e1f18b51bbc (patch)
treeb58c7b13c528fd36838d93c66b719cd6eb15385d /libpurple/plugins/log_reader.c
parentf1cc5fda246df90c63810ec84b04ed271f7aaff5 (diff)
parent24425c7bf513c5b5ebacb2edb5c8b8bd300c33fe (diff)
downloadpidgin-65400f6ba8868eac81beff77c19a3e1f18b51bbc.tar.gz
propagate from branch 'im.pidgin.pidgin' (head 0a7d2fde749b34ae6c3ac413e0472dfa9968818f)
to branch 'im.pidgin.soc.2007.remotelogging' (head 2648a61f652085b3b132639b954338e2d7a72a28)
Diffstat (limited to 'libpurple/plugins/log_reader.c')
-rw-r--r--libpurple/plugins/log_reader.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libpurple/plugins/log_reader.c b/libpurple/plugins/log_reader.c
index 71a27c5a00..3aa8e12a07 100644
--- a/libpurple/plugins/log_reader.c
+++ b/libpurple/plugins/log_reader.c
@@ -1290,9 +1290,16 @@ static GList *trillian_logger_list(PurpleLogType type, const char *sn, PurpleAcc
list = g_list_delete_link(list, last);
}
}
- } else if (line[0] && line[1] && line [3] &&
+ } else if (line[0] && line[1] && line[2] &&
purple_str_has_prefix(&line[3], "sion Start ")) {
-
+ /* The conditional is to make sure we're not reading off
+ * the end of the string. We don't want strlen(), as that'd
+ * have to count the whole string needlessly.
+ *
+ * The odd check here is because a Session Start at the
+ * beginning of the file can be overwritten with a UTF-8
+ * byte order mark. Yes, it's weird.
+ */
char *their_nickname = line;
char *timestamp;