diff -ruN tpop3d-cvs/auth_flatfile.c tpop3d/auth_flatfile.c --- tpop3d-cvs/auth_flatfile.c 2003-02-18 00:18:32.000000000 +0100 +++ tpop3d/auth_flatfile.c 2003-07-13 15:05:57.000000000 +0200 @@ -88,7 +88,7 @@ FILE *fp = NULL; char *filename = NULL; struct sverr err; - static char *buf, *pwhash; + static char *buf, *pwhash = NULL; static size_t buflen; size_t i, linenum; int c; @@ -109,7 +109,7 @@ linenum = 0; while (1) { - char *user, *end; + char *user, *hash, *end; i = 0; while ((c = getc(fp)) != EOF) { @@ -134,21 +134,22 @@ /* OK, have a line. */ user = buf; - pwhash = strchr(buf, ':'); - if (!pwhash) { + hash = strchr(buf, ':'); + if (!hash) { log_print(LOG_WARNING, _("read_user_passwd: flat file %s: line %u: bad format (missing :)"), filename, (unsigned)linenum); continue; } - *pwhash++ = 0; + *hash++ = 0; /* Check username. */ if (strcmp(user, local_part) != 0) continue; - if ((end = strchr(pwhash, ':'))) + if ((end = strchr(hash, ':'))) *end = 0; + pwhash = hash; break; }