avoid accessing uninited memory

This commit is contained in:
derselbst 2017-10-22 16:19:04 +02:00
parent 2623f67865
commit 36d8f95584

View file

@ -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++) {