urlcap crashfix (#23)

* url crash fix
This commit is contained in:
joonicks
2018-03-26 00:43:24 +02:00
committed by GitHub
parent 02aab28429
commit deb92cb01a
25 changed files with 111 additions and 128 deletions

View File

@@ -69,13 +69,7 @@ int read_bigcharset_callback(char *rest)
sz = strlen(rest);
if (sz > newchar->width)
newchar->width = sz;
pp = &newchar->data;
while(*pp)
pp = &(*pp)->next;
set_mallocdoer(read_bigcharset_callback);
*pp = sp = (Strp*)Calloc(sizeof(Strp) + sz);
/* Calloc sets to zero sp->next = NULL; */
Strcpy(sp->p,rest);
append_strp(&newchar->data,rest);
return(FALSE);
}