X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=srsd.c;fp=srsd.c;h=cd53c9e2faa11c4da01e03c415235b944d59ce3c;hb=c97451fb3eab020454f0a55e5306123a994b2d6b;hp=0ee15ca81ad56607283f75a0921d1332db422267;hpb=a5863c0d4cd6490fa980673e69324c4c49221a8b;p=apps%2Fpfixtools.git diff --git a/srsd.c b/srsd.c index 0ee15ca..cd53c9e 100644 --- a/srsd.c +++ b/srsd.c @@ -349,12 +349,12 @@ static srs_t *srs_read_secrets(const char *sfile) int n = strlen(buf); ++lineno; - if (buf[n - 1] != '\n') { + if (n == sizeof(buf) - 1 && buf[n - 1] != '\n') { syslog(LOG_CRIT, "%s:%d: line too long", sfile, lineno); goto error; } - - srs_add_secret(srs, buf); + m_strrtrim(buf); + srs_add_secret(srs, skipspaces(buf)); } if (!lineno) {