about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command.c4
-rw-r--r--src/windows.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/command.c b/src/command.c
index 609b3817..a02c77e9 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1301,7 +1301,7 @@ _cmd_tiny(const char * const inp, struct cmd_help_t help)
     if (args == NULL) {
         cons_show("Usage: %s", help.usage);
         if (win_in_chat()) {
-            char usage[strlen(help.usage + 8)];
+            char usage[strlen(help.usage) + 8];
             sprintf(usage, "Usage: %s", help.usage);
             win_show(usage);
         }
@@ -1660,7 +1660,7 @@ _cmd_set_boolean_preference(const char * const inp, struct cmd_help_t help,
         cons_show(disabled->str);
         set_func(FALSE);
     } else {
-        char usage[strlen(help.usage + 8)];
+        char usage[strlen(help.usage) + 8];
         sprintf(usage, "Usage: %s", help.usage);
         cons_show(usage);
     }
diff --git a/src/windows.c b/src/windows.c
index 5c86a90f..ebf57d6d 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -567,7 +567,7 @@ _win_notify_remind(gint unread)
     if (unread == 1) {
         sprintf(message, "1 unread message");
     } else {
-        sprintf(message, "%d unread messages", unread);
+        snprintf(message, sizeof(message), "%d unread messages", unread);
     }
 
     _win_notify(message, 5000, "Incoming message");