Domingo Alvarez Duarte wrote:
Fix a incorrect size for malloc.
----------------------------------- libtcc.c -----------------------------------
index 601999e..9f486f3 100644
@@ -328,11 +328,11 @@ static void tcc_split_path(TCCState *s, void ***p_ary,
int *p_nb_ary, const char
ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh_flags)
{
Section *sec;
- sec = tcc_mallocz(sizeof(Section) + strlen(name));
+ sec = tcc_mallocz(sizeof(Section) + strlen(name)+1);
This was not incorrect.
--- grischka
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel