From 52751d16aac48cc9264256d6bfb6253162cd80af Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Fri, 16 Nov 2012 14:07:31 +0200 Subject: [PATCH] _win_notify_remind: fix possible buffer overflow fix buffer overflow when 'unread' is greater than 999 --- src/windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");