mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 09:32:02 +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,9 +410,11 @@ 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++) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue