=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.97 retrieving revision 1.100 diff -u -p -r1.97 -r1.100 --- mandoc/cgi.c 2014/09/14 19:44:28 1.97 +++ mandoc/cgi.c 2014/10/28 17:36:19 1.100 @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.97 2014/09/14 19:44:28 schwarze Exp $ */ +/* $Id: cgi.c,v 1.100 2014/10/28 17:36:19 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -376,13 +376,10 @@ resp_begin_html(int code, const char *msg) resp_begin_http(code, msg); - printf("\n" + printf("\n" "\n" "\n" - "\n" + "\n" "\n" "q.manpath); + mchars, req->q.manpath); rc = mparse_readfd(mp, fd, file); close(fd); @@ -867,10 +866,11 @@ format(const struct req *req, const char *file) req->q.manpath, file); pg_error_internal(); mparse_free(mp); + mchars_free(mchars); return; } - vp = html_alloc(opts); + vp = html_alloc(mchars, opts); if (NULL != mdoc) html_mdoc(vp, mdoc); @@ -879,6 +879,7 @@ format(const struct req *req, const char *file) html_free(vp); mparse_free(mp); + mchars_free(mchars); free(opts); } @@ -1036,9 +1037,9 @@ main(void) /* Poor man's ReDoS mitigation. */ - itimer.it_value.tv_sec = 1; + itimer.it_value.tv_sec = 2; itimer.it_value.tv_usec = 0; - itimer.it_interval.tv_sec = 1; + itimer.it_interval.tv_sec = 2; itimer.it_interval.tv_usec = 0; if (setitimer(ITIMER_VIRTUAL, &itimer, NULL) == -1) { fprintf(stderr, "setitimer: %s\n", strerror(errno));