summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a5863c0)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
int n = strlen(buf);
++lineno;
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;
}
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));