Printf format checking added to logging function.

Printf format checking added to logging function and all
issues that were revealed by that fixed.
This commit is contained in:
Johan Wikman
2015-11-16 11:38:03 +02:00
parent 44df53d846
commit a355e1beef
26 changed files with 209 additions and 191 deletions

View File

@ -293,7 +293,7 @@ char errmsg[120];
tree->value[80] = 0;
sprintf(errmsg, "Unsupported show command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, errmsg)));
LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, "%s", errmsg)));
}
/**
@ -345,7 +345,7 @@ exec_flush(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported flush command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, errmsg);
skygw_log_write(LE, "%s", errmsg);
}
/**
@ -425,7 +425,7 @@ exec_set(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported set command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, errmsg);
skygw_log_write(LE, "%s", errmsg);
}
/**
@ -505,7 +505,7 @@ exec_clear(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported clear command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, errmsg);
skygw_log_write(LE, "%s", errmsg);
}
extern void shutdown_server();
@ -627,7 +627,7 @@ exec_shutdown(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported shutdown command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, errmsg);
skygw_log_write(LE, "%s", errmsg);
}
/**
@ -735,7 +735,7 @@ exec_restart(DCB *dcb, MAXINFO_TREE *tree)
}
sprintf(errmsg, "Unsupported restart command '%s'", tree->value);
maxinfo_send_error(dcb, 0, errmsg);
skygw_log_write(LE, errmsg);
skygw_log_write(LE, "%s", errmsg);
}
/**