--- a/src/util.c Tue Feb 22 15:16:56 2005 +0000 +++ b/src/util.c Tue Feb 22 16:06:29 2005 +0000 @@ -1122,7 +1122,10 @@ } g_string_append_printf(xhtml, "<span style='background: %s;'>", color->str); g_string_free(color, TRUE); - c = strchr(c, '>') + 1; + if ((c = strchr(c, '>')) != NULL) + c++; + else + c = p; pt->src_tag = "body"; pt->dest_tag = "span"; tags = g_list_prepend(tags, pt); @@ -2763,6 +2766,9 @@ if (end == NULL) end = strchr(s, '\n'); + if (end == NULL) + return FALSE; + len = end - s; new_url = g_malloc(len + 1);