this part of the patch is buggy:
* then reset repeats. We want the current time here,
* so put that in the file first.
*/
- fprintf(logs[i].f, stamp);
- fprintf(logs[i].f, MISC_LOGREPEAT, logs[i].repeats);
+ fprintf(logs[i].f, "%s", stamp);
+ fprintf(logs[i].f, "%s%s", MISC_LOGREPEAT, logs[i].repeats);
logs[i].repeats = 0;
/* No need to reset logs[i].szlast here
* because we update it later on...MISC_LOGREPEAT expands to "something %d" so replacing it with %s%s is wrong attached a new patch without that.
--- a/src/main.c
+++ b/src/main.c
@@ -489,7 +489,7 @@
break; /* this should never be reached */
case 'h':
printf("\n%s\n\n", version);
- printf(EGG_USAGE);
+ printf("%s", EGG_USAGE);
printf("\n");
bg_send_quit(BG_ABORT);
exit(0);
@@ -1042,7 +1042,7 @@
putlog(LOG_ALL, "*", "--- Loading %s (%s)", ver, s);
chanprog();
if (!encrypt_pass) {
- printf(MOD_NOCRYPT);
+ printf("%s", MOD_NOCRYPT);
bg_send_quit(BG_ABORT);
exit(1);
}
--- a/src/mod/transfer.mod/transfer.c
+++ b/src/mod/transfer.mod/transfer.c
@@ -786,7 +786,7 @@
static void display_dcc_fork_send(int idx, char *buf)
{
- sprintf(buf, TRANSFER_CONN_SEND);
+ sprintf(buf, "%s", TRANSFER_CONN_SEND);
}
static int expmem_dcc_xfer(void *x)
--- a/src/misc.c
+++ b/src/misc.c
@@ -601,7 +601,7 @@
* then reset repeats. We want the current time here,
* so put that in the file first.
*/
- fprintf(logs[i].f, stamp);
+ fprintf(logs[i].f, "%s", stamp);
fprintf(logs[i].f, MISC_LOGREPEAT, logs[i].repeats);
logs[i].repeats = 0;
/* No need to reset logs[i].szlast here
signature.asc
Description: OpenPGP digital signature

