Skip to content

Commit

Permalink
[bugfix] config: fixed buffer overflow in load_config()
Browse files Browse the repository at this point in the history
  • Loading branch information
nikp123 committed Aug 27, 2020
1 parent beabffc commit 5fd216a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void load_config(char *configPath, void* params)
}
p->gradient_colors = (char **)malloc(sizeof(char*) * p->gradients);
for(int i = 0;i < p->gradients;i++){
char ini_config[23];
char ini_config[33];
sprintf(ini_config, "color:gradient_color_%d", (i + 1));
p->gradient_colors[i] = (char *)iniparser_getstring(ini, ini_config, NULL);
if(p->gradient_colors[i] == NULL){
Expand Down

0 comments on commit 5fd216a

Please sign in to comment.