summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-09 09:27:01 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-09 09:27:01 +0000
commit35d827b0283971863d0116bab75dc6b2942ee2d8 (patch)
tree994840f2311f3d531af06caa90f6554481dfdb74 /cgi.c
parent4d67d3e6505d789b0262b285697634541204c556 (diff)
downloadmandoc-35d827b0283971863d0116bab75dc6b2942ee2d8.tar.gz
oops, forgot to trim the newline character
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgi.c b/cgi.c
index ed0f39cc..9457fe83 100644
--- a/cgi.c
+++ b/cgi.c
@@ -940,6 +940,8 @@ pathgen(struct req *req)
return;
while (NULL != (dp = fgetln(fp, &dpsz))) {
+ if ('\n' == dp[dpsz - 1])
+ dpsz--;
req->p = mandoc_realloc(req->p,
(req->psz + 1) * sizeof(char *));
req->p[req->psz++] = mandoc_strndup(dp, dpsz);