mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 13:21:03 +00:00
avoid accessing uninited memory
This commit is contained in:
parent
2623f67865
commit
36d8f95584
1 changed files with 3 additions and 1 deletions
|
@ -410,10 +410,12 @@ fluid_settings_set(fluid_settings_t* settings, const char *name, fluid_setting_n
|
|||
int n, num;
|
||||
char *dupname;
|
||||
|
||||
num = fluid_settings_tokenize (name, buf, tokens) - 1;
|
||||
num = fluid_settings_tokenize (name, buf, tokens);
|
||||
if (num == 0)
|
||||
return FLUID_FAILED;
|
||||
|
||||
num--;
|
||||
|
||||
for (n = 0; n < num; n++) {
|
||||
|
||||
node = fluid_hashtable_lookup(table, tokens[n]);
|
||||
|
|
Loading…
Reference in a new issue