Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid accessing uninited memory
  • Loading branch information
derselbst committed Oct 22, 2017
1 parent 2623f67 commit 36d8f95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/fluid_settings.c
Expand Up @@ -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++) {

Expand Down

0 comments on commit 36d8f95

Please sign in to comment.