diff options
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ struct writefunc_string { }; void init_writefunc_string(struct writefunc_string *s) { s->len = 0; - s->ptr = malloc(s->len+1); + s->ptr = malloc(s->len+1+250); if (s->ptr == NULL) { fprintf(stderr, "malloc() " DC_I18N_FAILED "\n"); exit(EXIT_FAILURE); @@ -13,7 +13,7 @@ void init_writefunc_string(struct writefunc_string *s) { } size_t writefunc(void *ptr, size_t size, size_t nmemb, struct writefunc_string *s) { size_t new_len = s->len + size*nmemb; - s->ptr = realloc(s->ptr, new_len+1); + s->ptr = realloc(s->ptr, new_len+1+250); if (s->ptr == NULL) { fprintf(stderr, "realloc() " DC_I18N_FAILED "\n"); exit(EXIT_FAILURE); |