Commit 9fb3db9d authored by Manuel Mohr's avatar Manuel Mohr
Browse files

Enlarge internal buffer.

Printing a large double (i.e., 1e256) exceeded the buffer size.
parent 6a01dd0a
......@@ -249,7 +249,7 @@ static int std_emit(lc_appendable_t *app, const lc_arg_occ_t *occ, const lc_arg_
}
/* strings are dumped directly, since they can get really big. A
* buffer of 128 letters for all other types should be enough. */
* buffer of 512 letters for all other types should be enough. */
case 's': {
const char *str = (const char*)val->v_ptr;
size_t size = strlen(str);
......@@ -259,7 +259,7 @@ static int std_emit(lc_appendable_t *app, const lc_arg_occ_t *occ, const lc_arg_
}
default: {
int len = MAX(128, occ->width + 1);
int len = MAX(512, occ->width + 1);
char *buf = XMALLOCN(char, len);
res = dispatch_snprintf(buf, len, fmt, occ->lc_arg_type, val);
assert(res < len);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment