/[imapfilter]/imapfilter/file.c
ViewVC logotype

Diff of /imapfilter/file.c

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

revision 1.44 by lefcha, Tue Aug 20 14:54:01 2002 UTC revision 1.45 by lefcha, Mon Aug 26 20:34:25 2002 UTC
# Line 318  int parse_passwords(FILE * fd) Line 318  int parse_passwords(FILE * fd)
318    
319      regcomp(&creg, reg, REG_EXTENDED | REG_ICASE);      regcomp(&creg, reg, REG_EXTENDED | REG_ICASE);
320    
321      while ((line = strsep(&c, "\n")) &&      line = strtok_r(c, "\n", &c);
322             !regexec(&creg, line, 4, match, 0)) {      while (line && !regexec(&creg, line, 4, match, 0)) {
323          user[0] = serv[0] = 0;          user[0] = serv[0] = 0;
324    
325          strncat(serv, line + match[1].rm_so,          strncat(serv, line + match[1].rm_so,
# Line 330  int parse_passwords(FILE * fd) Line 330  int parse_passwords(FILE * fd)
330          if ((pe = (char *)find_password(user, serv)))          if ((pe = (char *)find_password(user, serv)))
331              strncat(pe, line + match[3].rm_so,              strncat(pe, line + match[3].rm_so,
332                      min(match[3].rm_eo - match[3].rm_so, PASSWORD_LEN - 1));                      min(match[3].rm_eo - match[3].rm_so, PASSWORD_LEN - 1));
333    
334            line = strtok_r(NULL, "\n", &c);
335      }      }
336    
337      regfree(&creg);      regfree(&creg);

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26