--- app_authenticate.c.org 2005-08-05 15:34:29.000000000 -0400 +++ app_authenticate.c 2005-08-05 15:59:46.000000000 -0400 @@ -125,6 +125,7 @@ while (!feof(f)) { fgets(buf, sizeof(buf), f); if (!feof(f) && !ast_strlen_zero(buf)) { + buf[strlen(buf) - 1] = '\0'; if (strchr(opts, 'm')) { md5secret = strchr(buf, ':'); if (md5secret == NULL)