Skip to content
Snippets Groups Projects
Commit aaef8f18 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

load_cfg() now requires the size of the error string buffer passed as argument

parent 4dbe1a1b
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1156 failed
......@@ -53,7 +53,7 @@ int chat_open(int node_num, char *ctrl_dir)
memset(&cfg,0,sizeof(cfg));
cfg.size=sizeof(cfg);
SAFECOPY(cfg.ctrl_dir,ctrl_dir);
if(!load_cfg(&cfg, NULL, TRUE, str))
if(!load_cfg(&cfg, NULL, TRUE, str, sizeof(str)))
return(-1);
nodenum=node_num;
......
......@@ -125,7 +125,7 @@ G_MODULE_EXPORT void update_userlist_callback(GtkWidget *wiggy, gpointer data)
char str[1024];
free_cfg(&cfg);
if(!load_cfg(&cfg, NULL, TRUE, str)) {
if(!load_cfg(&cfg, NULL, TRUE, str, sizeof(str))) {
char error[256];
SAFEPRINTF(error, "ERROR Loading Configuration Data: %s", str);
display_message("Load Error",error,"gtk-dialog-error");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment