projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Strip whitespace for secrets
[apps/pfixtools.git]
/
srsd.c
diff --git
a/srsd.c
b/srsd.c
index
0ee15ca
..
cd53c9e
100644
(file)
--- a/
srsd.c
+++ b/
srsd.c
@@
-349,12
+349,12
@@
static srs_t *srs_read_secrets(const char *sfile)
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)
);
}
if (!lineno) {
}
if (!lineno) {