History

libtcc.c (put_extern_sym2): Extend the scope of buf to match its use

After leaving the code block that `buf' is defined, `buf' will not exist, so `name' will point to a variable that does not exist.

Lee Duhem committed 11 years ago

Commit f1703e21 parent 4bf3f6c1 file · +1 −2Browse files

Unified · Split

libtcc.c+1−2
@@ -459,9 +459,8 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 458 unmodified lines
459459 if (!sym->c) {
460460 name = get_tok_str(sym->v, NULL);
461461 #ifdef CONFIG_TCC_BCHECK
462+ char buf[32];
462463 if (tcc_state->do_bounds_check) {
463− char buf[32];
464−
465464 /* XXX: avoid doing that for statics ? */
466465 /* if bound checking is activated, we change some function
467466 names by adding the "__bound" prefix */

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