comparison libpurple/plugins/log_reader.c @ 31755:6d6056e176fe

log_reader: Fix an actual crash in the QIP reader. This crashes if there's at least two lines, and the last line doesn't contain a trailing newline. E.g: "\n<-- foo -->" written to a file.
author Paul Aurich <paul@darkrain42.org>
date Thu, 21 Jul 2011 05:39:48 +0000
parents d1ea32c41634
children b863432e81d1
comparison
equal deleted inserted replaced
31754:d6c47cc28870 31755:6d6056e176fe
1899 1899
1900 prev_tm = tm; 1900 prev_tm = tm;
1901 start_log = new_line; 1901 start_log = new_line;
1902 } 1902 }
1903 1903
1904 if (*c) { 1904 if (c && *c) {
1905 /* find EOF */ 1905 /* find EOF */
1906 c = strchr(c, '\n'); 1906 c = strchr(c, '\n');
1907 c++; 1907 c++;
1908 } 1908 }
1909 } 1909 }