changeset 18606:ac9f19a31051

merge of 'ee06baadf86c44d4707c364c06c874bd9b27ad07' and 'ff1016b75717a37c96fb6e4d7e388259022043de'
author Mark Doliner <mark@kingant.net>
date Sun, 22 Jul 2007 07:09:33 +0000
parents 5733c0691c25 (current diff) 321658bf0e03 (diff)
children c46515956e2e a244c34ce59c
files
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Sun Jul 22 07:02:28 2007 +0000
+++ b/libpurple/util.c	Sun Jul 22 07:09:33 2007 +0000
@@ -3994,6 +3994,10 @@
 		if (*c <= ' ' || *c >= 127) return FALSE;
 		if (strchr(rfc822_specials, *c)) return FALSE;
 	}
+
+	/* It's obviously not an email address if we didn't find an '@' above */
+	if (*c == '\0') return FALSE;
+
 	/* strictly we should return false if (*(c - 1) == '.') too, but I think
 	 * we should permit user.@domain type addresses - they do work :) */
 	if (c == address) return FALSE;