History

Fix a incorrect size for malloc.

mingodad committed 12 years ago

Commit 14bb8301 parent 4bc83ac1 file · +1 −1Browse files

Unified · Split

libtcc.c+1−1
@@ -330,7 +330,7 @@ ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh · 329 unmodified lines
330330 {
331331 Section *sec;
332332
333− sec = tcc_mallocz(sizeof(Section) + strlen(name));
333+ sec = tcc_mallocz(sizeof(Section) + strlen(name)+1);
334334 strcpy(sec->name, name);
335335 sec->sh_type = sh_type;
336336 sec->sh_flags = sh_flags;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t