From f17fdabb2746dc849151dc4ec8a9c4ad8b6ee0f6 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 1 Dec 2011 09:14:03 +0000 Subject: [PATCH] E notification: Fixed issue with notification content. The len passed to snprintf should include the \0. This caused garbage to be printed to screen when merging empty bodied notifications. SVN revision: 65763 --- src/modules/notification/e_mod_popup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/notification/e_mod_popup.c b/src/modules/notification/e_mod_popup.c index 567a7e5c6..c7cb98920 100644 --- a/src/modules/notification/e_mod_popup.c +++ b/src/modules/notification/e_mod_popup.c @@ -180,7 +180,7 @@ _notification_popup_merge(E_Notification *n) len += strlen(body_new); if (len < 65536) body_final = alloca(len + 5); else body_final = malloc(len + 5); - snprintf(body_final, len, "%s%s", body_old, body_new); + snprintf(body_final, len + 1, "%s%s", body_old, body_new); /* printf("set body %s\n", body_final); */ e_notification_body_set(n, body_final);