diff options
| author | mingodad <mingodad@gmail.com> | 2014-03-27 22:15:45 +0000 |
|---|---|---|
| committer | mingodad <mingodad@gmail.com> | 2014-03-27 22:15:45 +0000 |
| commit | 14bb8302c42576112472fdf7491dbb369c3e6db5 (patch) | |
| tree | a4d891534582f05514ae8b546d069ee5218ac170 | |
| parent | 4bc83ac3933efa565ae3326b55fcd711b63c073d (diff) | |
| download | tinycc-14bb8302c42576112472fdf7491dbb369c3e6db5.tar.gz tinycc-14bb8302c42576112472fdf7491dbb369c3e6db5.tar.bz2 | |
Fix a incorrect size for malloc.
| -rw-r--r-- | libtcc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -330,7 +330,7 @@ ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh { Section *sec; - sec = tcc_mallocz(sizeof(Section) + strlen(name)); + sec = tcc_mallocz(sizeof(Section) + strlen(name)+1); strcpy(sec->name, name); sec->sh_type = sh_type; sec->sh_flags = sh_flags; |
