Make slight SSL performance improvements

This commit is contained in:
Justine Tunney 2021-07-08 21:54:21 -07:00
parent 4178896aa0
commit fe881982b5
6 changed files with 100 additions and 19 deletions

View file

@ -33,7 +33,7 @@ int AppendFmt(struct Buffer *b, const char *fmt, ...) {
} else {
b->n = 16;
}
} while (b->i + n > b->n);
} while (b->i + n + 1 > b->n);
b->p = realloc(b->p, b->n);
vsnprintf(b->p + b->i, b->n - b->i, fmt, vb);
}