summaryrefslogtreecommitdiffstats
path: root/man2html/man2html.c
diff options
context:
space:
mode:
Diffstat (limited to 'man2html/man2html.c')
-rw-r--r--man2html/man2html.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/man2html/man2html.c b/man2html/man2html.c
index d3a0115..1a9309e 100644
--- a/man2html/man2html.c
+++ b/man2html/man2html.c
@@ -353,9 +353,12 @@ out_html(char *c) {
}
if (scaninbuff) {
while (*c) {
- if (buffpos >= buffmax) {
- buffer = xrealloc(buffer, buffmax*2);
- buffmax = buffmax*2;
+ while (buffpos >= buffmax) {
+ if (buffmax == 0)
+ buffmax = 32;
+ else
+ buffmax *= 2;
+ buffer = xrealloc(buffer, buffmax);
}
if (*c != '\a')
buffer[buffpos++] = *c;
@@ -3135,7 +3138,7 @@ error_page(char *s, char *t, ...) {
vfprintf(stdout, t, p);
va_end(p);
printf("</BODY></HTML>\n");
- exit(0);
+ abort();
}
char *