tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] trying tinycc on several hundred projects (results)


From: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] trying tinycc on several hundred projects (results)
Date: Fri, 28 Mar 2014 19:28:10 +0000

Yes you are right, it was pointed by scan-build from llvm/clang and indeed is a false positive, thanks for pointing it.

Cheers !


On Fri, Mar 28, 2014 at 7:13 PM, grischka <address@hidden> wrote:
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]