# HG changeset patch # User Sadrul Habib Chowdhury # Date 1275606491 0 # Node ID 7f021333e41f6a0bf1f83e9f9292ec7262818ea1 # Parent f06be7aff71c0ded627f438054ffb685e2ef1806 Prevent an invalid read when a message starts with 'mailto:'. diff -r f06be7aff71c -r 7f021333e41f libpurple/util.c --- a/libpurple/util.c Thu Jun 03 22:59:19 2010 +0000 +++ b/libpurple/util.c Thu Jun 03 23:08:11 2010 +0000 @@ -2163,7 +2163,7 @@ if (t - c == 7) { break; } - if (*(t - 1) == '.') + if (t > text && *(t - 1) == '.') t--; if ((d = strstr(c + 7, "?")) != NULL && d < t) url_buf = g_strndup(c + 7, d - c - 7); @@ -2183,10 +2183,7 @@ c = t; break; } - if (!t) - break; t++; - } } else if (c != text && (*c == '@')) { int flag;