FreeBSD Bugzilla – Attachment 198158 Details for
Bug 232267
mail/claws-mail-notification: fix stack corruption
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
claws-mail.patch (text/plain), 1.55 KB, created by
Ivan Rozhuk
on 2018-10-14 23:58:49 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2018-10-14 23:58:49 UTC
Size:
1.55 KB
patch
obsolete
>Index: mail/claws-mail/files/patch-src_plugins_notification_notification__core.c >=================================================================== >--- mail/claws-mail/files/patch-src_plugins_notification_notification__core.c (nonexistent) >+++ mail/claws-mail/files/patch-src_plugins_notification_notification__core.c (working copy) >@@ -0,0 +1,43 @@ >+--- src/plugins/notification/notification_core.c.orig 2017-12-17 14:48:41.000000000 +0300 >++++ src/plugins/notification/notification_core.c 2018-10-15 02:41:59.775686000 +0300 >+@@ -641,34 +641,34 @@ >+ } >+ >+ #ifdef HAVE_LIBNOTIFY >+-#define STR_MAX_LEN 511 >++#define STR_MAX_LEN 512 >+ /* Returns a newly allocated string which needs to be freed */ >+ gchar* notification_libnotify_sanitize_str(gchar *in) >+ { >+ gint out; >+- gchar tmp_str[STR_MAX_LEN+1]; >++ gchar tmp_str[STR_MAX_LEN+8]; >+ >+ if(in == NULL) return NULL; >+ >+ out = 0; >+ while(*in) { >+ if(*in == '<') { >+- if(out+4 > STR_MAX_LEN+1) break; >++ if(out+4 > STR_MAX_LEN) break; >+ memcpy(&(tmp_str[out]),"<",4); >+ in++; out += 4; >+ } >+ else if(*in == '>') { >+- if(out+4 > STR_MAX_LEN+1) break; >++ if(out+4 > STR_MAX_LEN) break; >+ memcpy(&(tmp_str[out]),">",4); >+ in++; out += 4; >+ } >+ else if(*in == '&') { >+- if(out+5 > STR_MAX_LEN+1) break; >++ if(out+5 > STR_MAX_LEN) break; >+ memcpy(&(tmp_str[out]),"&",5); >+ in++; out += 5; >+ } >+ else { >+- if(out+1 > STR_MAX_LEN+1) break; >++ if(out+1 > STR_MAX_LEN) break; >+ tmp_str[out++] = *in++; >+ } >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232267
: 198158