pidgin: 507bed04: Prevent an invalid read when a message s...
sadrul at pidgin.im
sadrul at pidgin.im
Thu Jun 3 19:15:47 EDT 2010
-----------------------------------------------------------------
Revision: 507bed04f6c5d4527fe68ad2ee48f01ad9760a24
Ancestor: eeef28c55dd6e7476c35edde363fb045a2d939f6
Author: sadrul at pidgin.im
Date: 2010-06-03T23:08:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/507bed04f6c5d4527fe68ad2ee48f01ad9760a24
Modified files:
libpurple/util.c
ChangeLog:
Prevent an invalid read when a message starts with 'mailto:'.
-------------- next part --------------
============================================================
--- libpurple/util.c fc2537aa2ca610ff6748b55802bfd3ff898bf7c2
+++ libpurple/util.c fc38e7dbac7fec50b9ca8f1577d7529a16c529fb
@@ -2163,7 +2163,7 @@ purple_markup_linkify(const char *text)
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 @@ purple_markup_linkify(const char *text)
c = t;
break;
}
- if (!t)
- break;
t++;
-
}
} else if (c != text && (*c == '@')) {
int flag;
More information about the Commits
mailing list