talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 763117cd9ab6536fc25c45cc7be49497d085085a
parent 5a109f1a419f3f216bcee5211e8af6ec6470f26a
Author: Colin Leroy <colin@colino.net>
Date:   Tue,  2 Oct 2018 16:21:16 +0200

Fix Coverity #1220388

Diffstat:
Msrc/plugins/notification/notification_core.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/notification/notification_core.c b/src/plugins/notification/notification_core.c @@ -656,22 +656,22 @@ gchar* notification_libnotify_sanitize_str(gchar *in) 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]),"&lt;",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]),"&gt;",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]),"&amp;",5); in++; out += 5; } else { - if(out+1 > STR_MAX_LEN+1) break; + if(out+1 > STR_MAX_LEN) break; tmp_str[out++] = *in++; } }