Correction for the commit db08122d31a681e593c6679140d2df0cc63c8784 As pointed Thomas Preud'homme buf[] may be used outside of the block whit code: name = block;
Unified · Split
| @@ -434,6 +434,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 433 unmodified lines | |||
| 434 | ElfW(Sym) *esym; | 434 | ElfW(Sym) *esym; |
| 435 | const char *name; | 435 | const char *name; |
| 436 | char buf1[256]; | 436 | char buf1[256]; |
| 437 | char buf[32]; | ||
| 437 | 438 | ||
| 438 | if (section == NULL) | 439 | if (section == NULL) |
| 439 | sh_num = SHN_UNDEF; | 440 | sh_num = SHN_UNDEF; |
| @@ -463,7 +464,6 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 23 unmodified lines | |||
| 463 | name = get_tok_str(sym->v, NULL); | 464 | name = get_tok_str(sym->v, NULL); |
| 464 | #ifdef CONFIG_TCC_BCHECK | 465 | #ifdef CONFIG_TCC_BCHECK |
| 465 | if (tcc_state->do_bounds_check) { | 466 | if (tcc_state->do_bounds_check) { |
| 466 | char buf[32]; | ||
| 467 | /* XXX: avoid doing that for statics ? */ | 467 | /* XXX: avoid doing that for statics ? */ |
| 468 | /* if bound checking is activated, we change some function | 468 | /* if bound checking is activated, we change some function |
| 469 | names by adding the "__bound" prefix */ | 469 | names by adding the "__bound" prefix */ |