/[winpt]/trunk/Src/wptUtil.cpp
ViewVC logotype

Diff of /trunk/Src/wptUtil.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 247 by twoaday, Fri Jul 21 08:19:24 2006 UTC revision 260 by twoaday, Wed Aug 16 10:01:30 2006 UTC
# Line 119  int Line 119  int
119  check_email_address (const char *email)  check_email_address (const char *email)
120  {  {
121      const char *allowed = "@._-%+;";      const char *allowed = "@._-%+;";
122      size_t i;      size_t i, len = strlen (email);
123    
124      if (!strchr (email, '@'))      if (len < 3 || !strchr (email, '@'))
125          return -1;          return -1;
126      for (i=0; i < strlen (email); i++) {      for (i=0; i < len; i++) {
127          if (isxdigit (email[i]) || isalpha (email[i])          if (isxdigit (email[i]) || isalpha (email[i])
128              || strchr (allowed, email[i]))              || strchr (allowed, email[i]))
129              continue;              continue;

Legend:
Removed from v.247  
changed lines
  Added in v.260

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26