--- a/mcabber/mcabber/commands.c Mon Sep 24 21:04:09 2018 +0200
+++ b/mcabber/mcabber/commands.c Fri Sep 28 06:45:58 2018 +0200
@@ -1982,7 +1982,7 @@
char tbuf[128];
strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time));
- snprintf(buffer, 127, "Status timestamp: %s", tbuf);
+ snprintf(buffer, 4095, "Status timestamp: %s", tbuf);
scr_WriteIncomingMessage(bjid, buffer,
0, HBB_PREFIX_INFO | HBB_PREFIX_CONT, 0);
}
@@ -3166,7 +3166,7 @@
char tbuf[128];
strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time));
- snprintf(buffer, 127, "Timestamp: %s", tbuf);
+ snprintf(buffer, 4095, "Timestamp: %s", tbuf);
scr_WriteIncomingMessage(bjid, buffer, 0, msg_flag | HBB_PREFIX_CONT, 0);
}
--- a/mcabber/mcabber/screen.c Mon Sep 24 21:04:09 2018 +0200
+++ b/mcabber/mcabber/screen.c Fri Sep 28 06:45:58 2018 +0200
@@ -4681,9 +4681,9 @@
case 'j':
if (isdigit((int)(unsigned char)inputLine[0]) &&
strlen(inputLine) <= 9) {
- char down_cmd[32];
- strncpy(down_cmd, mkcmdstr("roster down "), 32);
- strncat(down_cmd, inputLine, 16);
+ char down_cmd[24];
+ snprintf (down_cmd, sizeof(down_cmd), "%.13s%.9s",
+ mkcmdstr("roster down "), inputLine);
process_command(down_cmd, TRUE);
} else
process_command(mkcmdstr("roster down"), TRUE);
@@ -4691,9 +4691,9 @@
case 'k':
if (isdigit((int)(unsigned char)inputLine[0]) &&
strlen(inputLine) <= 9) {
- char up_cmd[32];
- strncpy(up_cmd, mkcmdstr("roster up "), 32);
- strncat(up_cmd, inputLine, 16);
+ char up_cmd[24];
+ snprintf (up_cmd, sizeof(up_cmd), "%.11s%.9s",
+ mkcmdstr("roster up "), inputLine);
process_command(up_cmd, TRUE);
} else
process_command(mkcmdstr("roster up "), TRUE);